@@ -682,7 +682,7 @@ func TestVUIntegrationInsecureRequests(t *testing.T) {
682
682
}
683
683
err = vu .RunOnce (context .Background ())
684
684
if data .errMsg != "" {
685
- require .NotNil (t , err )
685
+ require .Error (t , err )
686
686
assert .Contains (t , err .Error (), data .errMsg )
687
687
} else {
688
688
assert .NoError (t , err )
@@ -723,7 +723,7 @@ func TestVUIntegrationBlacklistOption(t *testing.T) {
723
723
return
724
724
}
725
725
err = vu .RunOnce (context .Background ())
726
- require .NotNil (t , err )
726
+ require .Error (t , err )
727
727
assert .Contains (t , err .Error (), "IP (10.1.2.3) is in a blacklisted range (10.0.0.0/8)" )
728
728
})
729
729
}
@@ -759,7 +759,7 @@ func TestVUIntegrationBlacklistScript(t *testing.T) {
759
759
return
760
760
}
761
761
err = vu .RunOnce (context .Background ())
762
- require .NotNil (t , err )
762
+ require .Error (t , err )
763
763
assert .Contains (t , err .Error (), "IP (10.1.2.3) is in a blacklisted range (10.0.0.0/8)" )
764
764
})
765
765
}
@@ -877,7 +877,7 @@ func TestVUIntegrationTLSConfig(t *testing.T) {
877
877
}
878
878
err = vu .RunOnce (context .Background ())
879
879
if data .errMsg != "" {
880
- require .NotNil (t , err )
880
+ require .Error (t , err )
881
881
assert .Contains (t , err .Error (), data .errMsg )
882
882
} else {
883
883
assert .NoError (t , err )
@@ -1174,7 +1174,7 @@ func TestVUIntegrationClientCerts(t *testing.T) {
1174
1174
vu , err := r .NewVU (make (chan stats.SampleContainer , 100 ))
1175
1175
if assert .NoError (t , err ) {
1176
1176
err := vu .RunOnce (context .Background ())
1177
- require .NotNil (t , err )
1177
+ require .Error (t , err )
1178
1178
assert .Contains (t , err .Error (), "remote error: tls: bad certificate" )
1179
1179
}
1180
1180
})
0 commit comments