mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
fix: enable compares rule from testifylint in module
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
parent
221bf19ee0
commit
407d74fb6a
@ -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)
|
||||
}
|
||||
})
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user