mirror of
https://github.com/stakater/Reloader.git
synced 2026-08-23 22:16:45 +00:00
refactor(workload): centralize workload listing with registry-based listers and add Argo Rollouts support
This commit is contained in:
@@ -178,6 +178,20 @@ func TestConfig_Validate_NormalizesIgnoredWorkloads(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfig_Validate_InvalidIgnoredWorkload(t *testing.T) {
|
||||
cfg := NewDefault()
|
||||
cfg.IgnoredWorkloads = []string{"deployment", "invalidtype"}
|
||||
|
||||
err := cfg.Validate()
|
||||
if err == nil {
|
||||
t.Fatal("Validate() should return error for invalid workload type")
|
||||
}
|
||||
|
||||
if !strings.Contains(err.Error(), "invalidtype") {
|
||||
t.Errorf("Error should mention invalid workload type, got: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfig_Validate_MultipleErrors(t *testing.T) {
|
||||
cfg := NewDefault()
|
||||
cfg.ReloadStrategy = "invalid"
|
||||
|
||||
Reference in New Issue
Block a user