Skip to content

Commit

Permalink
Fix apache#2834: add E2E test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnpoth committed Jan 19, 2022
1 parent 70e3c01 commit e35e5b9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions e2e/registry/registry_maven_wagon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,27 @@ func TestLocalDirectoryIsMountedInContainer(t *testing.T) {
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}

func TestExtractPomFromJar(t *testing.T) {
WithNewTestNamespace(t, func(ns string) {
Expect(Kamel("install", "-n", ns).Execute()).To(Succeed())

// Create integration that should decrypt foobar and log it
name := "foobar-decryption-pom-extraction"
jar, err := filepath.Abs("files/sample-decryption-1.0.jar")
assert.Nil(t, err)

Expect(Kamel("run", "files/FoobarDecryption.java",
"--name", name,
"-d", fmt.Sprintf("file://%s", jar),
"-n", ns,
).Execute()).To(Succeed())

Eventually(IntegrationPodPhase(ns, name), TestTimeoutMedium).Should(Equal(corev1.PodRunning))
Eventually(IntegrationCondition(ns, name, v1.IntegrationConditionReady), TestTimeoutShort).Should(Equal(corev1.ConditionTrue))
Eventually(IntegrationLogs(ns, name), TestTimeoutShort).Should(ContainSubstring("foobar"))

// Clean up
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
})
}

0 comments on commit e35e5b9

Please sign in to comment.