Skip to content

Commit

Permalink
feat: delete stacks after test
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyrag committed Nov 8, 2024
1 parent 19ea7a6 commit b188d0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/rolling-upgrades/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,15 @@ func cleanup(ctx context.Context, stack auto.Stack) {
return
}

fmt.Printf("Destroying stack '%s'...\r\n", stack.Name())
if _, err := stack.Destroy(ctx); err != nil {
logging.FromContext(ctx).Errorf("destroying stack: %v", err)
}

fmt.Printf("Removing stack '%s'...\r\n", stack.Name())
if err := stack.Workspace().RemoveStack(ctx, stack.Name()); err != nil {
logging.FromContext(ctx).Errorf("removing stack: %v", err)
}
}

func upAndPrintOutputs(ctx context.Context, stack auto.Stack) (auto.UpResult, error) {
Expand Down

0 comments on commit b188d0c

Please sign in to comment.