Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
SP12893678 committed Aug 6, 2024
1 parent 15f419c commit 64d903d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/admission/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,16 @@ func TestDefaultQueueName(t *testing.T) {
}

func TestConvert2Namespace(t *testing.T) {
configMap := &v1.Namespace{}
result := convert2Namespace(configMap)
assert.Equal(t, result != nil, true)
assert.Equal(t, reflect.DeepEqual(result, configMap), true)
namespace := &v1.Namespace{}
result := convert2Namespace(namespace)
assert.Check(t, result != nil)
assert.Check(t, reflect.DeepEqual(result, namespace))

obj := struct{}{}
result = convert2Namespace(obj)
assert.Equal(t, result == nil, true)
assert.Check(t, result == nil)

pod := &v1.Pod{}
result = convert2Namespace(pod)
assert.Equal(t, result == nil, true)
assert.Check(t, result == nil)
}

0 comments on commit 64d903d

Please sign in to comment.