argo-cd/test/e2e/pruning_required_test.go
jannfis ae49b45249
chore: Upgrade Go module to v2 (#5931)
* chore: Upgrade Go module to v2

Signed-off-by: jannfis <jann@mistrust.net>

* Restore import order

Signed-off-by: jannfis <jann@mistrust.net>

* fix knowntypes_normalizer codegen error

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix codegen

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

* fix Procfile

Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>

Co-authored-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
2021-04-01 20:44:18 +02:00

27 lines
529 B
Go

package e2e
import (
"testing"
. "github.com/argoproj/gitops-engine/pkg/sync/common"
. "github.com/argoproj/argo-cd/v2/test/e2e/fixture/app"
)
// check we fail with message if we delete a non-prunable resource
func TestPruningRequired(t *testing.T) {
Given(t).
Path("two-nice-pods").
Prune(false).
When().
IgnoreErrors().
Create().
Sync().
Then().
Expect(OperationPhaseIs(OperationSucceeded)).
When().
DeleteFile("pod-2.yaml").
Sync().
Then().
Expect(Error("", "1 resources require pruning"))
}