You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2022/01/27 13:45:53 UTC
[camel-k] branch main updated: [TEST] Global kamelet test - support for openshift
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push:
new d10da7f [TEST] Global kamelet test - support for openshift
d10da7f is described below
commit d10da7f965d2c74bb8f96c96dcc0ebd381d9ef09
Author: Andrej Smigala <as...@redhat.com>
AuthorDate: Tue Oct 5 13:13:45 2021 +0200
[TEST] Global kamelet test - support for openshift
---
e2e/common/cli/global_kamelet_test.go | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/e2e/common/cli/global_kamelet_test.go b/e2e/common/cli/global_kamelet_test.go
index 0c890fa..337a187 100644
--- a/e2e/common/cli/global_kamelet_test.go
+++ b/e2e/common/cli/global_kamelet_test.go
@@ -46,10 +46,10 @@ func TestRunGlobalKamelet(t *testing.T) {
}
}
- WithNewTestNamespace(t, func(ns string) {
- Expect(Kamel("install", "-n", ns, "--global", "--force").Execute()).To(Succeed())
+ test := func(operatorNamespace string) {
+ Expect(Kamel("install", "-n", operatorNamespace, "--global", "--force").Execute()).To(Succeed())
- Expect(CreateTimerKamelet(ns, "my-own-timer-source")()).To(Succeed())
+ Expect(CreateTimerKamelet(operatorNamespace, "my-own-timer-source")()).To(Succeed())
// NS2: namespace without operator
WithNewTestNamespace(t, func(ns2 string) {
@@ -61,6 +61,17 @@ func TestRunGlobalKamelet(t *testing.T) {
Expect(Kamel("delete", "--all", "-n", ns2).Execute()).To(Succeed())
})
- Expect(Kamel("uninstall", "-n", ns, "--skip-cluster-roles=false", "--skip-cluster-role-bindings=false").Execute()).To(Succeed())
- })
+ Expect(Kamel("uninstall", "-n", operatorNamespace, "--skip-crd", "--skip-cluster-roles=false", "--skip-cluster-role-bindings=false").Execute()).To(Succeed())
+ }
+
+ ocp, err := openshift.IsOpenShift(TestClient())
+ assert.Nil(t, err)
+ if ocp {
+ // global operators are always installed in the openshift-operators namespace
+ RegisterTestingT(t)
+ test("openshift-operators")
+ }else {
+ // create new namespace for the global operator
+ WithNewTestNamespace(t, test)
+ }
}