Skip to content

Commit 925f674

Browse files
pieternclaude
andauthored
acc: add cleanup trap to postgres acceptance tests (#4489)
## Summary Add cleanup trap to ensure postgres branches and endpoints are destroyed after tests complete, preventing resource leaks. ## Test plan Run affected acceptance tests: - `go test ./acceptance -run TestAccept/bundle/resources/postgres_branches/without_branch_id` - `go test ./acceptance -run TestAccept/bundle/resources/postgres_endpoints/without_endpoint_id` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent fd9ac31 commit 925f674

File tree

2 files changed

+10
-0
lines changed
  • acceptance/bundle/resources
    • postgres_branches/without_branch_id
    • postgres_endpoints/without_endpoint_id

2 files changed

+10
-0
lines changed

acceptance/bundle/resources/postgres_branches/without_branch_id/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
envsubst < databricks.yml.tmpl > databricks.yml
22

3+
cleanup() {
4+
$CLI bundle destroy --auto-approve > /dev/null 2>&1 || true
5+
}
6+
trap cleanup EXIT
7+
38
trace $CLI bundle validate
49

510
# Deploy output differs between engines, so capture to per-engine file only

acceptance/bundle/resources/postgres_endpoints/without_endpoint_id/script

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
envsubst < databricks.yml.tmpl > databricks.yml
22

3+
cleanup() {
4+
$CLI bundle destroy --auto-approve > /dev/null 2>&1 || true
5+
}
6+
trap cleanup EXIT
7+
38
trace $CLI bundle validate
49

510
# Deploy output differs between engines, so capture to per-engine file only

0 commit comments

Comments
 (0)