From e73adbeeb491c5f36b8ef958ac64a5f62b6eda1f Mon Sep 17 00:00:00 2001 From: Gaelle Fournier Date: Fri, 24 Nov 2023 11:35:02 +0100 Subject: [PATCH] chore(e2e): Refactor resources number const --- e2e/install/kustomize/setup_test.go | 21 --------------------- e2e/support/test_support.go | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/e2e/install/kustomize/setup_test.go b/e2e/install/kustomize/setup_test.go index 5b10586307..429f516e79 100644 --- a/e2e/install/kustomize/setup_test.go +++ b/e2e/install/kustomize/setup_test.go @@ -32,27 +32,6 @@ import ( . "github.com/onsi/gomega" ) -const ( - - // camel-k-operator, camel-k-operator-events, - // camel-k-operator-knative, camel-k-operator-leases, - // camel-k-operator-podmonitors, camel-k-operator-strimzi, - // camel-k-operator-keda - ExpectedKubePromoteRoles = 7 - - // camel-k-edit - // camel-k-operator-custom-resource-definitions - // camel-k-operator-bind-addressable-resolver - // camel-k-operator-local-registry - ExpectedKubeClusterRoles = 4 - - // camel-k-operator-openshift - ExpectedOSPromoteRoles = 1 - - // camel-k-operator-console-openshift - ExpectedOSClusterRoles = 1 -) - func TestSetupKustomizeBasic(t *testing.T) { RegisterTestingT(t) makeDir := testutil.MakeTempCopyDir(t, "../../../install") diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go index a342433f0b..ec1f5d5e16 100644 --- a/e2e/support/test_support.go +++ b/e2e/support/test_support.go @@ -102,6 +102,24 @@ const ciPID = "/tmp/ci-k8s-pid" // v1alpha1.Kamelet, v1alpha1.KameletBinding const ExpectedCRDs = 8 +// camel-k-operator, camel-k-operator-events, +// camel-k-operator-knative, camel-k-operator-leases, +// camel-k-operator-podmonitors, camel-k-operator-strimzi, +// camel-k-operator-keda +const ExpectedKubePromoteRoles = 7 + +// camel-k-edit +// camel-k-operator-custom-resource-definitions +// camel-k-operator-bind-addressable-resolver +// camel-k-operator-local-registry +const ExpectedKubeClusterRoles = 4 + +// camel-k-operator-openshift +const ExpectedOSPromoteRoles = 1 + +// camel-k-operator-console-openshift +const ExpectedOSClusterRoles = 1 + var TestTimeoutShort = 1 * time.Minute var TestTimeoutMedium = 5 * time.Minute var TestTimeoutLong = 15 * time.Minute