Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicitly compose wait command #36

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions internal/templates/03-delete.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,9 @@ spec:
{{- if eq $resource.KindGroup "secret." -}}
{{continue}}
{{- end }}
- wait:
apiVersion: {{ $resource.APIVersion }}
kind: {{ $resource.Kind }}
name: {{ $resource.Name }}
{{- if $resource.Namespace }}
namespace: {{ $resource.Namespace }}
{{- end }}
for:
deletion: {}
- script:
content: |
${KUBECTL} wait {{ if $resource.Namespace }}--namespace {{ $resource.Namespace }} {{ end }}--for=delete {{ $resource.KindGroup }}/{{ $resource.Name }} --timeout {{ $.TestCase.Timeout }}
{{- end }}
{{- if not .TestCase.OnlyCleanUptestResources }}
- script:
Expand Down
28 changes: 9 additions & 19 deletions internal/templates/renderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,9 @@ spec:
- name: Assert Deletion
description: Assert deletion of resources.
try:
- wait:
apiVersion: bucket.s3.aws.upbound.io/v1alpha1
kind: Bucket
name: example-bucket
for:
deletion: {}
- script:
content: |
${KUBECTL} wait --for=delete s3.aws.upbound.io/example-bucket --timeout 10m0s
- script:
content: |
${KUBECTL} wait managed --all --for=delete --timeout -1s
Expand Down Expand Up @@ -427,19 +424,12 @@ spec:
- name: Assert Deletion
description: Assert deletion of resources.
try:
- wait:
apiVersion: bucket.s3.aws.upbound.io/v1alpha1
kind: Bucket
name: example-bucket
for:
deletion: {}
- wait:
apiVersion: cluster.gcp.platformref.upbound.io/v1alpha1
kind: Cluster
name: test-cluster-claim
namespace: upbound-system
for:
deletion: {}
- script:
content: |
${KUBECTL} wait --for=delete s3.aws.upbound.io/example-bucket --timeout 10m0s
- script:
content: |
${KUBECTL} wait --namespace upbound-system --for=delete cluster.gcp.platformref.upbound.io/test-cluster-claim --timeout 10m0s
- script:
content: |
${KUBECTL} wait managed --all --for=delete --timeout -1s
Expand Down