-
Notifications
You must be signed in to change notification settings - Fork 202
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
tests: Cleanup subscription deployments as part of tests #4558
base: main
Are you sure you want to change the base?
Conversation
@@ -240,6 +244,47 @@ func Test_CLI_Aspire_Deploy(t *testing.T) { | |||
require.NoError(t, err) | |||
} | |||
|
|||
// cleanupDeployments deletes all subscription level deployments tagged with `azd-env-name` equal to envName. If the session | |||
// indcates we are in playback mode, this function is a no-op. | |||
func cleanupDeployments(ctx context.Context, t *testing.T, azCLI *azdcli.CLI, session *recording.Session, envName string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My strategy to figure out what tests needed to call this was to look for calls to NewCLI
where we pass in a *Session
and arrange for these tests to call cleanupDeployments
.
Here's an internal run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=4335287&view=results which should exercise the delete codepath (we don't get coverage from our regular PR CI runs of this, since we use playback mode). |
e698804
to
b983042
Compare
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
No description provided.