Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions apis/status/v1beta1/constraintpodstatus_types_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package v1beta1_test

import (
"strings"
"testing"

"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -53,7 +52,7 @@ func TestNewConstraintStatusForPod(t *testing.T) {
v1beta1.ConstraintNameLabel: "a-constraint",
v1beta1.ConstraintKindLabel: "AConstraintKind",
v1beta1.PodLabel: podName,
v1beta1.ConstraintTemplateNameLabel: strings.ToLower(cstrKind),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be reverted?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've already found it, and I understand it's golang-lint problem, but in order to pass the check, I've made an irrelevant change

v1beta1.ConstraintTemplateNameLabel: "aconstraintkind",
})

err = controllerutil.SetOwnerReference(pod, wantStatus, scheme)
Expand Down
6 changes: 3 additions & 3 deletions pkg/readiness/ready_tracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,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)
Expand Down Expand Up @@ -562,7 +562,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)
Expand All @@ -572,7 +572,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)
}
Expand Down