prefer NoError/Error over Nil/NotNil

This commit is contained in:
Stephen Solka
2020-07-18 20:23:35 -04:00
parent 1a04aac31d
commit 203679cc61
36 changed files with 113 additions and 113 deletions

View File

@@ -59,7 +59,7 @@ func fakeContainerMgrMountInt() mount.Interface {
func TestCgroupMountValidationSuccess(t *testing.T) {
f, err := validateSystemRequirements(fakeContainerMgrMountInt())
assert.Nil(t, err)
assert.NoError(t, err)
if cgroups.IsCgroup2UnifiedMode() {
assert.True(t, f.cpuHardcapping, "cpu hardcapping is expected to be enabled")
} else {
@@ -116,7 +116,7 @@ func TestCgroupMountValidationMultipleSubsystem(t *testing.T) {
},
})
_, err := validateSystemRequirements(mountInt)
assert.Nil(t, err)
assert.NoError(t, err)
}
func TestGetCpuWeight(t *testing.T) {