Skip to content

Commit 9827682

Browse files
committed
Adjust to change in selector validation error output
Signed-off-by: Stefan Büringer [email protected]
1 parent f3f3556 commit 9827682

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/webhooks/test/machinedrainrules_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ func Test_validate(t *testing.T) {
146146
},
147147
wantErr: "admission webhook \"validation.machinedrainrule.cluster.x-k8s.io\" denied the request: " +
148148
"MachineDrainRule.cluster.x-k8s.io \"mdr\" is invalid: [" +
149-
"spec.machines[0].selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator, " +
150-
"spec.machines[0].clusterSelector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator, " +
151-
"spec.pods[0].selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator, " +
152-
"spec.pods[0].namespaceSelector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator]",
149+
"spec.machines[0].selector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator, " +
150+
"spec.machines[0].clusterSelector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator, " +
151+
"spec.pods[0].selector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator, " +
152+
"spec.pods[0].namespaceSelector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator]",
153153
},
154154
{
155155
name: "Return error if machine selectors are not unique",

0 commit comments

Comments
 (0)