fix(e2e): Clean-up namespace after kamel run tests
@@ -24,13 +24,15 @@ package common
import (
"testing"
- . "github.com/apache/camel-k/e2e/support"
- camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
. "github.com/onsi/gomega"
+
v1 "k8s.io/api/core/v1"
+
+ . "github.com/apache/camel-k/e2e/support"
+ camelv1 "github.com/apache/camel-k/pkg/apis/camel/v1"
)
-func TestRunExamplesFromGitHUB(t *testing.T) {
+func TestRunExamplesFromGitHub(t *testing.T) {
WithNewTestNamespace(t, func(ns string) {
Expect(Kamel("install", "-n", ns).Execute()).Should(BeNil())
@@ -73,5 +75,8 @@ func TestRunExamplesFromGitHUB(t *testing.T) {
Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("Tick!"))
Expect(Kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
+
+ // Cleanup
+ Expect(Kamel("delete", "--all", "-n", ns).Execute()).Should(BeNil())
})
}
