Skip to content

Commit

Permalink
test(e2e): change catch order
Browse files Browse the repository at this point in the history
  • Loading branch information
whg517 committed Dec 31, 2024
1 parent 22d2b28 commit e767fea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ chainsaw-setup: ## Run the chainsaw setup

.PHONY: chainsaw-test
chainsaw-test: chainsaw ## Run the chainsaw test
KUBECONFIG=$(KIND_KUBECONFIG) $(CHAINSAW) test --cluster cluster-1=$(KIND_KUBECONFIG) --test-dir ./test/e2e/
- KUBECONFIG=$(KIND_KUBECONFIG) $(CHAINSAW) test --cluster cluster-1=$(KIND_KUBECONFIG) --test-dir ./test/e2e/
KUBECONFIG=$(KIND_KUBECONFIG) kubectl logs -n $(TEST_NAMESPACE) -l "app.kubernetes.io/name=secret-operator"

.PHONY: chainsaw-cleanup
Expand Down
16 changes: 8 additions & 8 deletions test/e2e/krb5/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ spec:
file: node-scope.yaml
- assert:
file: node-scope-assert.yaml
- catch:
- script:
env:
- name: NAMESPACE
value: ($namespace)
content: |
kubectl -n "$NAMESPACE" get pod
kubectl -n "$NAMESPACE" describe pod
- try:
- apply:
file: service-scope.yaml
Expand All @@ -99,11 +107,3 @@ spec:
file: pod-scope.yaml
- assert:
file: pod-scope-assert.yaml
- catch:
- script:
env:
- name: NAMESPACE
value: ($namespace)
content: |
kubectl -n "$NAMESPACE" get pod
kubectl -n "$NAMESPACE" describe pod
17 changes: 9 additions & 8 deletions test/e2e/tls/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ spec:
file: tls-scope.yaml
- assert:
file: tls-scope-assert.yaml
- catch:
- script:
env:
- name: NAMESPACE
value: ($namespace)
content: |
kubectl -n "$NAMESPACE" get pod
kubectl -n "$NAMESPACE" describe pod
# tls will expires case
- try:
- apply:
Expand Down Expand Up @@ -46,11 +55,3 @@ spec:
fi
check:
($error == null): true
- catch:
- script:
env:
- name: NAMESPACE
value: ($namespace)
content: |
kubectl -n "$NAMESPACE" get pod
kubectl -n "$NAMESPACE" describe pod

0 comments on commit e767fea

Please sign in to comment.