Commit 9a6319b2 authored by Dong Liu's avatar Dong Liu

Update error assertation

parent f0046a71
...@@ -150,9 +150,8 @@ func TestEnsureNodeExistsByProviderID(t *testing.T) { ...@@ -150,9 +150,8 @@ func TestEnsureNodeExistsByProviderID(t *testing.T) {
instances, _ := fc.Instances() instances, _ := fc.Instances()
exists, err := ensureNodeExistsByProviderID(instances, tc.node) exists, err := ensureNodeExistsByProviderID(instances, tc.node)
if tc.providerIDErr == nil { assert.Equal(t, err, tc.providerIDErr)
assert.NoError(t, err)
}
assert.EqualValues(t, tc.expectedCalls, fc.Calls, assert.EqualValues(t, tc.expectedCalls, fc.Calls,
"expected cloud provider methods `%v` to be called but `%v` was called ", "expected cloud provider methods `%v` to be called but `%v` was called ",
tc.expectedCalls, fc.Calls) tc.expectedCalls, fc.Calls)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment