Update error assertation

This commit is contained in:
Dong Liu 2018-05-03 10:22:20 +08:00
parent f0046a7194
commit 9a6319b23c

View File

@ -150,9 +150,8 @@ func TestEnsureNodeExistsByProviderID(t *testing.T) {
instances, _ := fc.Instances()
exists, err := ensureNodeExistsByProviderID(instances, tc.node)
if tc.providerIDErr == nil {
assert.NoError(t, err)
}
assert.Equal(t, err, tc.providerIDErr)
assert.EqualValues(t, tc.expectedCalls, fc.Calls,
"expected cloud provider methods `%v` to be called but `%v` was called ",
tc.expectedCalls, fc.Calls)