Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
Signed-off-by: Max Smythe <smythe@google.com>
  • Loading branch information
maxsmythe committed Jan 24, 2023
1 parent 3ce6b43 commit af03bb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ violation[{"msg": "denied!"}] {

// Set up tracker
tracker, err := readiness.SetupTracker(mgr, false, false)
if err != nil {
if err != nil && !strings.Contains(err.Error(), "unable to add new checker because healthz endpoint has already been created") {
t.Fatal(err)
}

Expand Down
8 changes: 4 additions & 4 deletions pkg/target/target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestValidateConstraint(t *testing.T) {
"matchExpressions": [{
"key": "someKey",
"operator": "NotIn",
"values": ["some value"]
"values": ["some-value"]
}]
}
},
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestValidateConstraint(t *testing.T) {
ErrorExpected: true,
},
{
Name: "Invalid LabelSelector MatchLels",
Name: "Invalid LabelSelector MatchLabels",
Constraint: `
{
"apiVersion": "constraints.gatekeeper.sh/v1beta1",
Expand Down Expand Up @@ -212,7 +212,7 @@ func TestValidateConstraint(t *testing.T) {
"matchExpressions": [{
"key": "someKey",
"operator": "In",
"values": ["some value"]
"values": ["some-value"]
}]
}
},
Expand Down Expand Up @@ -245,7 +245,7 @@ func TestValidateConstraint(t *testing.T) {
"matchExpressions": [{
"key": "someKey",
"operator": "In",
"values": ["some value"]
"values": ["some-value"]
}]
}
},
Expand Down

0 comments on commit af03bb5

Please sign in to comment.