github.com/argoproj/argo-cd@v1.8.7/test/e2e/pruning_required_test.go (about) 1 package e2e 2 3 import ( 4 "testing" 5 6 . "github.com/argoproj/gitops-engine/pkg/sync/common" 7 8 . "github.com/argoproj/argo-cd/test/e2e/fixture/app" 9 ) 10 11 // check we fail with message if we delete a non-prunable resource 12 func TestPruningRequired(t *testing.T) { 13 Given(t). 14 Path("two-nice-pods"). 15 Prune(false). 16 When(). 17 IgnoreErrors(). 18 Create(). 19 Sync(). 20 Then(). 21 Expect(OperationPhaseIs(OperationSucceeded)). 22 When(). 23 DeleteFile("pod-2.yaml"). 24 Sync(). 25 Then(). 26 Expect(Error("", "1 resources require pruning")) 27 }