Skip to content

Commit

Permalink
fix(e2e): integration test refactoring
Browse files Browse the repository at this point in the history
Ref #3487
  • Loading branch information
squakez committed Aug 8, 2022
1 parent 735f016 commit f107f5b
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions e2e/global/common/integration_fail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,10 @@ func TestBadRouteIntegration(t *testing.T) {
Should(gstruct.PointTo(BeNumerically("==", 2)))
// Check the Integration stays in error phase
Eventually(IntegrationPhase(ns, name), TestTimeoutShort).Should(Equal(v1.IntegrationPhaseError))
})

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

func TestMissingDependencyIntegration(t *testing.T) {
WithNewTestNamespace(t, func(ns string) {
operatorID := "camel-k-missing-dependencies"
Expect(KamelInstallWithID(operatorID, ns).Execute()).To(Succeed())
// Clean up
Expect(Kamel("delete", "--all", "-n", ns).Execute()).To(Succeed())
})

t.Run("run missing dependency java route", func(t *testing.T) {
RegisterTestingT(t)
Expand All @@ -80,9 +73,9 @@ func TestMissingDependencyIntegration(t *testing.T) {
build := Build(ns, kitName)()
Eventually(build.Status.Phase, TestTimeoutShort).Should(Equal(v1.BuildPhaseError))
Eventually(build.Status.Failure.Recovery.Attempt, TestTimeoutShort).Should(Equal(5))
})

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

0 comments on commit f107f5b

Please sign in to comment.