Skip to content

Commit bcaef92

Browse files
Replace assert to require
1 parent cd5e7ed commit bcaef92

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cloud/linode/cloud_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,8 @@ func TestNewCloud(t *testing.T) {
149149
}()
150150
_, err := newCloud()
151151
t.Log(err)
152-
if !assert.Error(t, err, "expected error if nodebalancer-prefix is longer than 19 chars") {
153-
t.Errorf("No error when nodebalancer-prefix is longer 19 than")
154-
}
155-
if !assert.ErrorContains(t, err, "nodebalancer-prefix") {
156-
t.Errorf("Error message does not concern nodebalancer-prefix: %s", err)
157-
}
152+
require.Error(t, err, "expected error if nodebalancer-prefix is longer than 19 chars")
153+
require.ErrorContains(t, err, "nodebalancer-prefix")
158154
})
159155
}
160156

0 commit comments

Comments
 (0)