From cd06e4db1fa8c2eda0e08d8699964fa41fca3cfa Mon Sep 17 00:00:00 2001 From: jennybuckley Date: Wed, 21 Mar 2018 15:13:43 -0700 Subject: [PATCH] Remove wildcard matching of no-op test webhooks --- test/e2e/apimachinery/webhook.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/e2e/apimachinery/webhook.go b/test/e2e/apimachinery/webhook.go index ad851111341..a5a9a12daf9 100644 --- a/test/e2e/apimachinery/webhook.go +++ b/test/e2e/apimachinery/webhook.go @@ -788,10 +788,11 @@ func testWebhookForWebhookConfigurations(f *framework.Framework) { Name: "should-be-removable-validating-webhook.k8s.io", Rules: []v1beta1.RuleWithOperations{{ Operations: []v1beta1.OperationType{v1beta1.Create}, + // This will not match any real resources so this webhook should never be called. Rule: v1beta1.Rule{ - APIGroups: []string{"*"}, - APIVersions: []string{"*"}, - Resources: []string{"*"}, + APIGroups: []string{""}, + APIVersions: []string{"v1"}, + Resources: []string{"invalid"}, }, }}, ClientConfig: v1beta1.WebhookClientConfig{ @@ -831,10 +832,11 @@ func testWebhookForWebhookConfigurations(f *framework.Framework) { Name: "should-be-removable-mutating-webhook.k8s.io", Rules: []v1beta1.RuleWithOperations{{ Operations: []v1beta1.OperationType{v1beta1.Create}, + // This will not match any real resources so this webhook should never be called. Rule: v1beta1.Rule{ - APIGroups: []string{"*"}, - APIVersions: []string{"*"}, - Resources: []string{"*"}, + APIGroups: []string{""}, + APIVersions: []string{"v1"}, + Resources: []string{"invalid"}, }, }}, ClientConfig: v1beta1.WebhookClientConfig{