@@ -22,7 +22,7 @@ func TestValidationErrors(t *testing.T) {
2222 t .Run ("single validation error" , func (t * testing.T ) {
2323 ve := & ValidationErrors {}
2424 ve .Add (fmt .Errorf ("test error" ))
25-
25+
2626 if ! ve .HasErrors () {
2727 t .Error ("Expected errors" )
2828 }
@@ -35,11 +35,11 @@ func TestValidationErrors(t *testing.T) {
3535 ve := & ValidationErrors {}
3636 ve .Add (fmt .Errorf ("error 1" ))
3737 ve .Add (fmt .Errorf ("error 2" ))
38-
38+
3939 if ! ve .HasErrors () {
4040 t .Error ("Expected errors" )
4141 }
42-
42+
4343 expected := "multiple validation errors: error 1; error 2"
4444 if ve .Error () != expected {
4545 t .Errorf ("Expected '%s', got %s" , expected , ve .Error ())
@@ -49,7 +49,7 @@ func TestValidationErrors(t *testing.T) {
4949 t .Run ("add nil error should be ignored" , func (t * testing.T ) {
5050 ve := & ValidationErrors {}
5151 ve .Add (nil )
52-
52+
5353 if ve .HasErrors () {
5454 t .Error ("Expected no errors when adding nil" )
5555 }
@@ -67,12 +67,12 @@ func TestConfigValidate(t *testing.T) {
6767 t .Run ("invalid default prober" , func (t * testing.T ) {
6868 cfg := DefaultConfig ()
6969 cfg .Default = "nonexistent"
70-
70+
7171 err := cfg .Validate ()
7272 if err == nil {
7373 t .Error ("Expected validation error for invalid default prober" )
7474 }
75-
75+
7676 if ! strings .Contains (err .Error (), "default prober 'nonexistent' not found" ) {
7777 t .Errorf ("Expected error about nonexistent default prober, got: %v" , err )
7878 }
@@ -86,12 +86,12 @@ func TestConfigValidate(t *testing.T) {
8686 ExpectCodes : "invalid-pattern" ,
8787 },
8888 }
89-
89+
9090 err := cfg .Validate ()
9191 if err == nil {
9292 t .Error ("Expected validation error for invalid prober config" )
9393 }
94-
94+
9595 if ! strings .Contains (err .Error (), "prober 'invalid'" ) {
9696 t .Errorf ("Expected error about invalid prober, got: %v" , err )
9797 }
@@ -114,12 +114,12 @@ func TestConfigValidate(t *testing.T) {
114114 Port : 53 ,
115115 },
116116 }
117-
117+
118118 err := cfg .Validate ()
119119 if err == nil {
120120 t .Error ("Expected validation errors" )
121121 }
122-
122+
123123 errMsg := err .Error ()
124124 if ! strings .Contains (errMsg , "multiple validation errors" ) {
125125 t .Errorf ("Expected multiple validation errors message, got: %v" , err )
@@ -132,7 +132,7 @@ func TestConfigValidate(t *testing.T) {
132132 t .Run ("empty default prober should be valid" , func (t * testing.T ) {
133133 cfg := DefaultConfig ()
134134 cfg .Default = ""
135-
135+
136136 if err := cfg .Validate (); err != nil {
137137 t .Errorf ("Empty default prober should be valid: %v" , err )
138138 }
@@ -182,7 +182,7 @@ prober:
182182 if err == nil {
183183 t .Error ("Invalid config should fail validation" )
184184 }
185-
185+
186186 if ! strings .Contains (err .Error (), "invalid TOS value" ) {
187187 t .Errorf ("Expected TOS validation error, got: %v" , err )
188188 }
@@ -201,7 +201,7 @@ prober:
201201 if err == nil {
202202 t .Error ("Invalid HTTP config should fail validation" )
203203 }
204-
204+
205205 if ! strings .Contains (err .Error (), "invalid expect_codes pattern" ) {
206206 t .Errorf ("Expected expect_codes validation error, got: %v" , err )
207207 }
@@ -222,9 +222,9 @@ prober:
222222 if err == nil {
223223 t .Error ("Invalid DNS config should fail validation" )
224224 }
225-
225+
226226 if ! strings .Contains (err .Error (), "DNS server is required" ) {
227227 t .Errorf ("Expected DNS server validation error, got: %v" , err )
228228 }
229229 })
230- }
230+ }
0 commit comments