Skip to content

Commit

Permalink
clean up test resources && fix failing test
Browse files Browse the repository at this point in the history
Signed-off-by: Atif Ali <[email protected]>
  • Loading branch information
aali309 committed Feb 1, 2025
1 parent 43e3678 commit 68cd075
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/k8s/1-046_validate_application_tracking/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,14 @@ data:
installationID: "instance-2"
resource.tracking.method: "annotation"
---
# Check first namespace labels
# Check first namespace
apiVersion: v1
kind: Namespace
metadata:
name: source-ns-1
labels:
argocd.argoproj.io/managed-by: test-1-046-argocd-1
argocd.argoproj.io/tracking-id: instance-1
---
# Check second namespace labels
# Check second namespace
apiVersion: v1
kind: Namespace
metadata:
name: source-ns-2
labels:
argocd.argoproj.io/managed-by: test-1-046-argocd-2
argocd.argoproj.io/tracking-id: instance-2
35 changes: 35 additions & 0 deletions tests/k8s/1-046_validate_application_tracking/04-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
# Delete test namespaces
- apiVersion: v1
kind: Namespace
name: test-1-046-argocd-1
- apiVersion: v1
kind: Namespace
name: test-1-046-argocd-2
- apiVersion: v1
kind: Namespace
name: source-ns-1
- apiVersion: v1
kind: Namespace
name: source-ns-2
# Delete ArgoCD instances
- apiVersion: argoproj.io/v1beta1
kind: ArgoCD
name: argocd-1
namespace: test-1-046-argocd-1
- apiVersion: argoproj.io/v1beta1
kind: ArgoCD
name: argocd-2
namespace: test-1-046-argocd-2
# Delete Applications
- apiVersion: argoproj.io/v1alpha1
kind: Application
name: test-app
namespace: test-1-046-argocd-1
- apiVersion: argoproj.io/v1alpha1
kind: Application
name: test-app
namespace: test-1-046-argocd-2
timeout: 120 # Give enough time for cascade deletion

0 comments on commit 68cd075

Please sign in to comment.