Skip to content

Commit

Permalink
Merge branch 'apache:master' into YUNIKORN-2724
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankert01 authored Aug 11, 2024
2 parents 47ba6d5 + c5f4074 commit 41e88ad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/admission/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package admission

import (
"reflect"
"strings"
"testing"

Expand Down Expand Up @@ -189,3 +190,18 @@ func TestDefaultQueueName(t *testing.T) {
t.Fatal("UpdatePodLabelForAdmissionController is not as expected")
}
}

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

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

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

0 comments on commit 41e88ad

Please sign in to comment.