diff --git a/e2e/application/application_test.go b/e2e/application/application_test.go index c7f4a68f9..8ce90b9b7 100644 --- a/e2e/application/application_test.go +++ b/e2e/application/application_test.go @@ -19,6 +19,7 @@ package e2e import ( context2 "context" "fmt" + "strings" "time" "github.com/Netflix/go-expect" @@ -98,7 +99,7 @@ var ApplicationStatusDeeplyContext = func(context string, applicationName, workl cli := fmt.Sprintf("vela status %s", applicationName) output, err := e2e.LongTimeExec(cli, 120*time.Second) gomega.Expect(err).NotTo(gomega.HaveOccurred()) - gomega.Expect(output).To(gomega.ContainSubstring("healthy")) + gomega.Expect(strings.ToLower(output)).To(gomega.ContainSubstring("healthy")) // TODO(zzxwill) need to check workloadType after app status is refined }) }) diff --git a/test/e2e-test/application_test.go b/test/e2e-test/application_test.go index 771bc205e..a1b7efdfe 100644 --- a/test/e2e-test/application_test.go +++ b/test/e2e-test/application_test.go @@ -28,6 +28,7 @@ import ( v1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" rbacv1 "k8s.io/api/rbac/v1" + "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/controller-runtime/pkg/client" @@ -364,7 +365,7 @@ var _ = Describe("Application Normal tests", func() { { Verbs: []string{rbacv1.VerbAll}, APIGroups: []string{"apps"}, - Resources: []string{"deployments"}, + Resources: []string{"deployments", "controllerrevisions"}, }, }, } @@ -402,6 +403,11 @@ var _ = Describe("Application Normal tests", func() { By("Checking an application status") verifyWorkloadRunningExpected("myweb", 1, "stefanprodan/podinfo:4.0.3") verifyComponentRevision("myweb", 1) + + Expect(k8sClient.Delete(ctx, &newApp)).Should(Succeed()) + Eventually(func(g Gomega) { + g.Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(&newApp), &newApp)).Should(Satisfy(errors.IsNotFound)) + }, 15*time.Second).Should(Succeed()) }) It("Test app with ServiceAccount which has no permission for the component", func() {