diff --git a/test/e2e/app_deletion_test.go b/test/e2e/app_deletion_test.go index 6edaa7de6a..94de5dae24 100644 --- a/test/e2e/app_deletion_test.go +++ b/test/e2e/app_deletion_test.go @@ -3,18 +3,15 @@ package e2e import ( "testing" + "github.com/argoproj/argo-cd/errors" . "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" . "github.com/argoproj/argo-cd/test/e2e/fixture" . "github.com/argoproj/argo-cd/test/e2e/fixture/app" - "github.com/argoproj/argo-cd/test/fixture/test" ) // when a app gets stuck in sync, and we try to delete it, it won't delete, instead we must then terminate it // and deletion will then just happen func TestDeletingAppStuckInSync(t *testing.T) { - - test.Flaky(t) - Given(t). Async(true). Path("hook"). @@ -25,6 +22,8 @@ func TestDeletingAppStuckInSync(t *testing.T) { Then(). // stuck in running state Expect(OperationPhaseIs(OperationRunning)). + Expect(SyncStatusIs(SyncStatusCodeSynced)). + Expect(ResourceResultNumbering(2)). When(). Delete(true). Then(). @@ -34,7 +33,7 @@ func TestDeletingAppStuckInSync(t *testing.T) { TerminateOp(). And(func() { // force delete the resource - _, _ = Run("", "kubectl", "-n", DeploymentNamespace(), "exec", "-i", "hook", "touch", "/tmp/done") + errors.FailOnErr(Run("", "kubectl", "-n", DeploymentNamespace(), "exec", "-i", "hook", "touch", "/tmp/done")) }). Then(). // delete is successful