Commit f95bc928 authored by Cao Shufeng's avatar Cao Shufeng

fix assert.Equal argument order

parent d5ee83bd
...@@ -342,5 +342,5 @@ func TestGenerateMountBindings(t *testing.T) { ...@@ -342,5 +342,5 @@ func TestGenerateMountBindings(t *testing.T) {
} }
result := generateMountBindings(mounts) result := generateMountBindings(mounts)
assert.Equal(t, result, expectedResult) assert.Equal(t, expectedResult, result)
} }
...@@ -2309,7 +2309,7 @@ func TestPreferValidatedPSP(t *testing.T) { ...@@ -2309,7 +2309,7 @@ func TestPreferValidatedPSP(t *testing.T) {
_, pspName, validationErrs, err := plugin.computeSecurityContext(attrs, pod, false, tc.validatedPSPHint) _, pspName, validationErrs, err := plugin.computeSecurityContext(attrs, pod, false, tc.validatedPSPHint)
assert.NoError(t, err) assert.NoError(t, err)
assert.Len(t, validationErrs, tc.expectValidationErrs) assert.Len(t, validationErrs, tc.expectValidationErrs)
assert.Equal(t, pspName, tc.expectedPSP) assert.Equal(t, tc.expectedPSP, pspName)
}) })
} }
} }
......
...@@ -39,7 +39,7 @@ func TestGrowth(t *testing.T) { ...@@ -39,7 +39,7 @@ func TestGrowth(t *testing.T) {
} }
assert.Equalf(t, x, read, "expected to have read %d items: %d", x, read) assert.Equalf(t, x, read, "expected to have read %d items: %d", x, read)
assert.Zerof(t, g.readable, "expected readable to be zero: %d", g.readable) assert.Zerof(t, g.readable, "expected readable to be zero: %d", g.readable)
assert.Equalf(t, g.n, 16, "expected N to be 16: %d", g.n) assert.Equalf(t, 16, g.n, "expected N to be 16: %d", g.n)
} }
func TestEmpty(t *testing.T) { func TestEmpty(t *testing.T) {
......
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