Skip to content

Commit

Permalink
Start migration of test Kamel -> CamelK
Browse files Browse the repository at this point in the history
  • Loading branch information
gansheer committed Mar 11, 2024
1 parent a664a58 commit c05455e
Show file tree
Hide file tree
Showing 45 changed files with 166 additions and 162 deletions.
4 changes: 2 additions & 2 deletions e2e/common/languages/groovy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ func TestRunSimpleGroovyExamples(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("run groovy", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/groovy.groovy").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/groovy.groovy").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "groovy"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "groovy", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "groovy"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
4 changes: 2 additions & 2 deletions e2e/common/languages/java_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ func TestRunSimpleJavaExamples(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("run java", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Java.java").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Java.java").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "java"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "java", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "java"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
5 changes: 3 additions & 2 deletions e2e/common/languages/js_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ func TestRunSimpleJavaScriptExamples(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("run js", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/js.js").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/js.js").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "js"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "js", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "js"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})

}
4 changes: 2 additions & 2 deletions e2e/common/languages/kotlin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ func TestRunSimpleKotlinExamples(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("run kotlin", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/kotlin.kts").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/kotlin.kts").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "kotlin"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "kotlin", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "kotlin"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
4 changes: 2 additions & 2 deletions e2e/common/languages/polyglot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ func TestRunPolyglotExamples(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("run polyglot", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "--name", "polyglot", "files/js-polyglot.js", "files/yaml-polyglot.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "--name", "polyglot", "files/js-polyglot.js", "files/yaml-polyglot.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "polyglot"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "polyglot", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "polyglot"), TestTimeoutShort).Should(ContainSubstring("Magicpolyglot-yaml"))
g.Eventually(IntegrationLogs(t, ns, "polyglot"), TestTimeoutShort).Should(ContainSubstring("Magicpolyglot-js"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
4 changes: 2 additions & 2 deletions e2e/common/languages/xml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ func TestRunSimpleXmlExamples(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("run xml", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/xml.xml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/xml.xml").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "xml"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "xml", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "xml"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
4 changes: 2 additions & 2 deletions e2e/common/languages/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ func TestRunSimpleYamlExamples(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("run yaml", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/yaml.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/yaml.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "yaml"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "yaml", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "yaml"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
4 changes: 2 additions & 2 deletions e2e/common/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ func TestMain(m *testing.M) {
var t *testing.T

g.Expect(TestClient(t)).ShouldNot(BeNil())
g.Expect(KamelRunWithID(t, operatorID, ns, "languages/files/Java.java").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "languages/files/Java.java").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "java"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "java", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "java"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))

g.Expect(KamelRunWithID(t, operatorID, ns, "languages/files/yaml.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "languages/files/yaml.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "yaml"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "yaml", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "yaml"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
Expand Down
2 changes: 1 addition & 1 deletion e2e/common/misc/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ func TestClientFunctionalities(t *testing.T) {
err = camel.CamelV1().Integrations(ns).Delete(TestContext, "dummy", metav1.DeleteOptions{})
require.NoError(t, err)

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
12 changes: 6 additions & 6 deletions e2e/common/misc/cron_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,40 +45,40 @@ func TestRunCronExample(t *testing.T) {
g.Eventually(SelectedPlatformPhase(t, ns, operatorID), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))

t.Run("cron", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/cron.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/cron.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationCronJob(t, ns, "cron"), TestTimeoutLong).ShouldNot(BeNil())
g.Eventually(IntegrationConditionStatus(t, ns, "cron", v1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "cron"), TestTimeoutMedium).Should(ContainSubstring("Magicstring!"))
})

t.Run("cron-yaml", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/cron-yaml.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/cron-yaml.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationCronJob(t, ns, "cron-yaml"), TestTimeoutLong).ShouldNot(BeNil())
g.Eventually(IntegrationConditionStatus(t, ns, "cron-yaml", v1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "cron-yaml"), TestTimeoutMedium).Should(ContainSubstring("Magicstring!"))
})

t.Run("cron-timer", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/cron-timer.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/cron-timer.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationCronJob(t, ns, "cron-timer"), TestTimeoutLong).ShouldNot(BeNil())
g.Eventually(IntegrationConditionStatus(t, ns, "cron-timer", v1.IntegrationConditionReady), TestTimeoutMedium).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "cron-timer"), TestTimeoutMedium).Should(ContainSubstring("Magicstring!"))
})

t.Run("cron-fallback", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/cron-fallback.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/cron-fallback.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "cron-fallback"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "cron-fallback", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "cron-fallback"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

t.Run("cron-quartz", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/cron-quartz.yaml").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/cron-quartz.yaml").Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, "cron-quartz"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, "cron-quartz", v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
g.Eventually(IntegrationLogs(t, ns, "cron-quartz"), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
20 changes: 10 additions & 10 deletions e2e/common/misc/integration_fail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestBadRouteIntegration(t *testing.T) {

t.Run("run bad java route", func(t *testing.T) {
name := RandomizedSuffixName("bad-route")
g.Expect(KamelRunWithID(t, operatorID, ns, "files/BadRoute.java", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/BadRoute.java", "--name", name).Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationPhase(t, ns, name), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseError))
g.Eventually(IntegrationConditionStatus(t, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).
Expand All @@ -71,7 +71,7 @@ func TestBadRouteIntegration(t *testing.T) {

t.Run("run missing dependency java route", func(t *testing.T) {
name := RandomizedSuffixName("java-route")
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Java.java", "--name", name,
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Java.java", "--name", name,
"-d", "mvn:com.example:nonexistent:1.0").Execute()).To(Succeed())
// Integration in error
g.Eventually(IntegrationPhase(t, ns, name), TestTimeoutLong).Should(Equal(v1.IntegrationPhaseError))
Expand All @@ -90,7 +90,7 @@ func TestBadRouteIntegration(t *testing.T) {
g.Eventually(build.Status.Failure.Recovery.Attempt, TestTimeoutShort).Should(Equal(5))

// Fixing the route should reconcile the Integration
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Eventually(IntegrationPhase(t, ns, name), TestTimeoutLong).Should(Equal(v1.IntegrationPhaseRunning))
// New Kit success
kitRecoveryName := IntegrationKit(t, ns, name)()
Expand All @@ -105,7 +105,7 @@ func TestBadRouteIntegration(t *testing.T) {

t.Run("run invalid dependency java route", func(t *testing.T) {
name := RandomizedSuffixName("invalid-dependency")
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Java.java", "--name", name,
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Java.java", "--name", name,
"-d", "camel:non-existent").Execute()).To(Succeed())
// Integration in error with Initialization Failed condition
g.Eventually(IntegrationPhase(t, ns, name), TestTimeoutLong).Should(Equal(v1.IntegrationPhaseError))
Expand All @@ -119,7 +119,7 @@ func TestBadRouteIntegration(t *testing.T) {
g.Consistently(IntegrationKit(t, ns, name), 10*time.Second).Should(BeEmpty())

// Fixing the route should reconcile the Integration in Initialization Failed condition to Running
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).
Should(Equal(corev1.ConditionTrue))
Expand All @@ -135,7 +135,7 @@ func TestBadRouteIntegration(t *testing.T) {

t.Run("run unresolvable component java route", func(t *testing.T) {
name := RandomizedSuffixName("unresolvable-route")
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Unresolvable.java", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Unresolvable.java", "--name", name).Execute()).To(Succeed())
// Integration in error with Initialization Failed condition
g.Eventually(IntegrationPhase(t, ns, name), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseError))
g.Eventually(IntegrationConditionStatus(t, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).
Expand All @@ -148,7 +148,7 @@ func TestBadRouteIntegration(t *testing.T) {
g.Consistently(IntegrationKit(t, ns, name), 10*time.Second).Should(BeEmpty())

// Fixing the route should reconcile the Integration in Initialization Failed condition to Running
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).
Should(Equal(corev1.ConditionTrue))
Expand All @@ -164,7 +164,7 @@ func TestBadRouteIntegration(t *testing.T) {

t.Run("run invalid java route", func(t *testing.T) {
name := RandomizedSuffixName("invalid-java-route")
g.Expect(KamelRunWithID(t, operatorID, ns, "files/InvalidJava.java", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/InvalidJava.java", "--name", name).Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationPhase(t, ns, name), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseError))
g.Eventually(IntegrationConditionStatus(t, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).
Expand All @@ -177,7 +177,7 @@ func TestBadRouteIntegration(t *testing.T) {
g.Eventually(KitPhase(t, integrationKitNamespace, kitName), TestTimeoutShort).Should(Equal(v1.IntegrationKitPhaseReady))

// Fixing the route should reconcile the Integration in Initialization Failed condition to Running
g.Expect(KamelRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/Java.java", "--name", name).Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).
Should(Equal(corev1.ConditionTrue))
Expand All @@ -189,6 +189,6 @@ func TestBadRouteIntegration(t *testing.T) {

})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
7 changes: 4 additions & 3 deletions e2e/common/misc/integration_trait_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ func TestTraitUpdates(t *testing.T) {

t.Run("run and update trait", func(t *testing.T) {
name := RandomizedSuffixName("yaml-route")
g.Expect(KamelRunWithID(t, operatorID, ns, "files/yaml.yaml", "--name", name).Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/yaml.yaml", "--name", name).Execute()).To(Succeed())
g.Eventually(IntegrationPodPhase(t, ns, name), TestTimeoutLong).Should(Equal(corev1.PodRunning))
g.Eventually(IntegrationConditionStatus(t, ns, name, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
var numberOfPods = func(pods *int32) bool {
return *pods >= 1 && *pods <= 2
}
// Adding a property will change the camel trait
g.Expect(KamelRunWithID(t, operatorID, ns, "files/yaml.yaml", "--name", name, "-p", "hello=world").Execute()).To(Succeed())
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/yaml.yaml", "--name", name, "-p", "hello=world").Execute()).To(Succeed())
g.Consistently(IntegrationPodsNumbers(t, ns, name), TestTimeoutShort, 1*time.Second).Should(Satisfy(numberOfPods))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})

}
4 changes: 2 additions & 2 deletions e2e/common/misc/kamelet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:

// Basic
t.Run("test basic case", func(t *testing.T) {
g.Expect(KamelRunWithID(t, operatorID, ns, "files/TimerKameletIntegration.java", "-t", "kamelets.enabled=false",
g.Expect(CamelKRunWithID(t, operatorID, ns, "files/TimerKameletIntegration.java", "-t", "kamelets.enabled=false",
"--resource", "configmap:my-kamelet-cm@/kamelets",
"-p camel.component.kamelet.location=file:/kamelets",
"-d", "camel:yaml-dsl",
Expand All @@ -139,6 +139,6 @@ spec:
g.Expect(kameletsTrait["enabled"]).To(Equal(false))
})

g.Expect(Kamel(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
g.Expect(CamelK(t, "delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}
Loading

0 comments on commit c05455e

Please sign in to comment.