package runnercfg import ( "html/template" "net/http" "net/http/httptest" "net/url" "os" "path/filepath" "strings" "testing" "time" "gitlab.com/Timfa/bluegit/internal/i18n" ) func TestValidate(t *testing.T) { s := Defaults() if err := s.Validate(); err != nil { t.Fatal(err) } bad := []func(*Settings){ func(s *Settings) { s.Concurrency = 0 }, func(s *Settings) { s.Concurrency = 65 }, func(s *Settings) { s.MaxImages = 0 }, func(s *Settings) { s.MemoryMB = 10 }, func(s *Settings) { s.CPUs = -1 }, func(s *Settings) { s.PullPolicy = "sometimes" }, func(s *Settings) { s.Labels = []string{"bad label!"} }, func(s *Settings) { s.Name = "