Skip to content

Commit

Permalink
[issue-368] knative integration with DataIndex and JobService: fix e2…
Browse files Browse the repository at this point in the history
…e test errors and use temp images for DI and JS
  • Loading branch information
jianrongzhang89 committed Aug 3, 2024
1 parent 26f2741 commit 6a207ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/e2e/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func verifySchemaMigration(data, name string) bool {
}

func verifyKSinkInjection(label, ns string) bool {
GinkgoWriter.Println(fmt.Sprintf("failed to get pod for label: %v, ns=%s", label, ns))
cmd := exec.Command("kubectl", "get", "pod", "-n", ns, "-l", label, "-o", "jsonpath={.items[*].metadata.name}")
out, err := utils.Run(cmd)
if err != nil {
Expand Down
16 changes: 13 additions & 3 deletions test/e2e/platform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,21 @@ var _ = Describe("Validate the persistence", Ordered, func() {
Expect(err).NotTo(HaveOccurred())
By("Wait for SonataFlowPlatform CR to complete deployment")
// wait for service deployments to be ready
EventuallyWithOffset(1, func() error {
EventuallyWithOffset(1, func() bool {
cmd = exec.Command("kubectl", "wait", "pod", "-n", targetNamespace, "-l", "app.kubernetes.io/name in (jobs-service,data-index-service)", "--for", "condition=Ready", "--timeout=5s")
_, err = utils.Run(cmd)
return err
}, 25*time.Minute, 5).Should(Succeed())
if err != nil {
return false
}
GinkgoWriter.Println("before verifyKSinkInjection")
if profile == metadata.PreviewProfile.String() {
res := verifyKSinkInjection("app.kubernetes.io/name=jobs-service", targetNamespace)
GinkgoWriter.Println(fmt.Sprintf("verifyKSinkInjection: %v", res))
return res
}
GinkgoWriter.Println("after verifyKSinkInjection, return true")
return true
}, 25*time.Minute, 5).Should(BeTrue())
By("Evaluate status of service's health endpoint")
cmd = exec.Command("kubectl", "get", "pod", "-l", "app.kubernetes.io/name in (jobs-service,data-index-service)", "-n", targetNamespace, "-ojsonpath={.items[*].metadata.name}")
output, err := utils.Run(cmd)
Expand Down

0 comments on commit 6a207ee

Please sign in to comment.