Skip to content

Commit

Permalink
js: NotNil -> Error
Browse files Browse the repository at this point in the history
  • Loading branch information
cuonglm authored and na-- committed Nov 25, 2019
1 parent 8911dc2 commit e3aa1aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ func TestVUIntegrationInsecureRequests(t *testing.T) {
}
err = vu.RunOnce(context.Background())
if data.errMsg != "" {
require.NotNil(t, err)
require.Error(t, err)
assert.Contains(t, err.Error(), data.errMsg)
} else {
assert.NoError(t, err)
Expand Down Expand Up @@ -723,7 +723,7 @@ func TestVUIntegrationBlacklistOption(t *testing.T) {
return
}
err = vu.RunOnce(context.Background())
require.NotNil(t, err)
require.Error(t, err)
assert.Contains(t, err.Error(), "IP (10.1.2.3) is in a blacklisted range (10.0.0.0/8)")
})
}
Expand Down Expand Up @@ -759,7 +759,7 @@ func TestVUIntegrationBlacklistScript(t *testing.T) {
return
}
err = vu.RunOnce(context.Background())
require.NotNil(t, err)
require.Error(t, err)
assert.Contains(t, err.Error(), "IP (10.1.2.3) is in a blacklisted range (10.0.0.0/8)")
})
}
Expand Down Expand Up @@ -877,7 +877,7 @@ func TestVUIntegrationTLSConfig(t *testing.T) {
}
err = vu.RunOnce(context.Background())
if data.errMsg != "" {
require.NotNil(t, err)
require.Error(t, err)
assert.Contains(t, err.Error(), data.errMsg)
} else {
assert.NoError(t, err)
Expand Down Expand Up @@ -1174,7 +1174,7 @@ func TestVUIntegrationClientCerts(t *testing.T) {
vu, err := r.NewVU(make(chan stats.SampleContainer, 100))
if assert.NoError(t, err) {
err := vu.RunOnce(context.Background())
require.NotNil(t, err)
require.Error(t, err)
assert.Contains(t, err.Error(), "remote error: tls: bad certificate")
}
})
Expand Down

0 comments on commit e3aa1aa

Please sign in to comment.