Skip to content

Commit

Permalink
Add pre-delete-hook to resourceshareaccepter.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
turkenf committed Aug 10, 2023
1 parent d4dd791 commit 0742365
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/ram/resourceshareaccepter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ kind: PrincipalAssociation
metadata:
annotations:
meta.upbound.io/example-id: ram/v1beta1/resourceshareaccepter
uptest.upbound.io/pre-delete-hook: testhooks/delete-resourceshareaccepter.sh
labels:
testing.upbound.io/example-name: sender_invite
name: sender-invite
Expand Down
7 changes: 7 additions & 0 deletions examples/ram/testhooks/delete-resourceshareaccepter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -aeuo pipefail

# Note(turkenf): We are getting "ResourceShare arn.... could not be found" error
# when deleted before the PrincipalAssociation resource ResourceShareAccepter resource.
# This is a workaround for this problem to make automated tests to work.
${KUBECTL} delete resourceshareaccepter.ram.aws.upbound.io --all

0 comments on commit 0742365

Please sign in to comment.