diff --git a/apis/status/v1beta1/constraintpodstatus_types_test.go b/apis/status/v1beta1/constraintpodstatus_types_test.go index ca7f6be1633..cfd7cf6f728 100644 --- a/apis/status/v1beta1/constraintpodstatus_types_test.go +++ b/apis/status/v1beta1/constraintpodstatus_types_test.go @@ -1,7 +1,6 @@ package v1beta1_test import ( - "strings" "testing" "github.com/google/go-cmp/cmp" @@ -53,7 +52,7 @@ func TestNewConstraintStatusForPod(t *testing.T) { v1beta1.ConstraintNameLabel: "a-constraint", v1beta1.ConstraintKindLabel: "AConstraintKind", v1beta1.PodLabel: podName, - v1beta1.ConstraintTemplateNameLabel: strings.ToLower(cstrKind), + v1beta1.ConstraintTemplateNameLabel: "aconstraintkind", }) err = controllerutil.SetOwnerReference(pod, wantStatus, scheme) diff --git a/pkg/readiness/ready_tracker_test.go b/pkg/readiness/ready_tracker_test.go index 0007bb9dd69..81037eac6e2 100644 --- a/pkg/readiness/ready_tracker_test.go +++ b/pkg/readiness/ready_tracker_test.go @@ -512,7 +512,7 @@ func Test_CollectDeleted(t *testing.T) { type test struct { description string gvk schema.GroupVersionKind - tracker readiness.Expectations + tracker *readiness.Expectations } g := gomega.NewWithT(t) @@ -570,7 +570,7 @@ func Test_CollectDeleted(t *testing.T) { // between them to keep the test short. Trackers are mostly independent per GVK. tests := []test{ {description: "constraints", gvk: cgvk}, - {description: "data (configmaps)", gvk: cmgvk, tracker: cmtracker}, + {description: "data (configmaps)", gvk: cmgvk, tracker: &cmtracker}, {description: "templates", gvk: ctgvk}, // no need to check Config here since it is not actually Expected for readiness // (the objects identified in a Config's syncOnly are Expected, tested in data case above) @@ -580,7 +580,7 @@ func Test_CollectDeleted(t *testing.T) { t.Run(tc.description, func(t *testing.T) { var tt readiness.Expectations if tc.tracker != nil { - tt = tc.tracker + tt = *tc.tracker } else { tt = tracker.For(tc.gvk) }