mirror of
https://github.com/argoproj/argo-cd
synced 2026-05-23 09:18:26 +00:00
parent
bc77e8ce12
commit
583be34815
1 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue