fix: enable compares rule from testifylint in module

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL 2024-09-21 21:23:07 +02:00
parent 221bf19ee0
commit 407d74fb6a
2 changed files with 6 additions and 6 deletions

View File

@ -445,8 +445,8 @@ func TestOpenAPIMemCache(t *testing.T) {
continue
}
assert.True(t, reflect.ValueOf(paths).Pointer() == reflect.ValueOf(pathsAgain).Pointer())
assert.True(t, reflect.ValueOf(original).Pointer() == reflect.ValueOf(schemaAgain).Pointer())
assert.Equal(t, reflect.ValueOf(paths).Pointer(), reflect.ValueOf(pathsAgain).Pointer())
assert.Equal(t, reflect.ValueOf(original).Pointer(), reflect.ValueOf(schemaAgain).Pointer())
// Invalidate and try again. This time pointers should not be equal
client.Invalidate()
@ -461,8 +461,8 @@ func TestOpenAPIMemCache(t *testing.T) {
continue
}
assert.True(t, reflect.ValueOf(paths).Pointer() != reflect.ValueOf(pathsAgain).Pointer())
assert.True(t, reflect.ValueOf(original).Pointer() != reflect.ValueOf(schemaAgain).Pointer())
assert.NotEqual(t, reflect.ValueOf(paths).Pointer(), reflect.ValueOf(pathsAgain).Pointer())
assert.NotEqual(t, reflect.ValueOf(original).Pointer(), reflect.ValueOf(schemaAgain).Pointer())
assert.Equal(t, original, schemaAgain)
}
})

View File

@ -2425,9 +2425,9 @@ func TestAggregatedServerGroupsAndResources(t *testing.T) {
"%s: Expected GVKs (%s), got (%s)", test.name, expectedGroupNames.List(), actualGroupNames.List())
// If the core V1 group is returned from /api, it should be the first group.
if expectedGroupNames.Has("") {
assert.True(t, len(apiGroups) > 0)
assert.NotEmpty(t, apiGroups)
actualFirstGroup := apiGroups[0]
assert.True(t, len(actualFirstGroup.Versions) > 0)
assert.NotEmpty(t, actualFirstGroup.Versions)
actualFirstGroupVersion := actualFirstGroup.Versions[0].GroupVersion
assert.Equal(t, "v1", actualFirstGroupVersion)
}