Skip to content

Commit

Permalink
fix(e2e): Fix TestCamelTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
gansheer committed Oct 24, 2023
1 parent eaa464d commit 9f684d4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion e2e/common/traits/camel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ import (

. "github.com/apache/camel-k/v2/e2e/support"
v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
"github.com/apache/camel-k/v2/pkg/util/log"
)

func TestCamelTrait(t *testing.T) {
RegisterTestingT(t)

t.Run("properties changes should not rebuild", func(t *testing.T) {
name := "java"
name := "javapropertiesnorebuild"
log.Info("operator [%s][ns], integration [%s]", operatorID, ns, name)
Expect(KamelRunWithID(operatorID, ns, "files/Java.java",
"--name", name,
).Execute()).To(Succeed())
Expand All @@ -46,6 +48,7 @@ func TestCamelTrait(t *testing.T) {
Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
integrationKit := IntegrationKit(ns, name)()

log.Info("change property for integration [%s], with lit [%s]", "java", integrationKit)
Expect(KamelRunWithID(operatorID, ns, "files/Java.java",
"--name", name,
"-p", "a=1",
Expand All @@ -54,6 +57,9 @@ func TestCamelTrait(t *testing.T) {
Eventually(IntegrationConditionStatus(ns, name, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("Magicstring!"))
Eventually(IntegrationKit(ns, name)).Should(Equal(integrationKit))

Expect(Kamel("delete", name, "-n", ns).Execute()).To(Succeed())
Eventually(Integration(ns, name), TestTimeoutLong).Should(BeNil())
})

// Clean-up
Expand Down

0 comments on commit 9f684d4

Please sign in to comment.