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

Updates functional test to run provision preview #4356

Merged
merged 1 commit into from
Sep 19, 2024
Merged
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
11 changes: 11 additions & 0 deletions cli/azd/test/functional/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,10 +310,21 @@ func Test_CLI_ProvisionState(t *testing.T) {

expectedOutputContains := "There are no changes to provision for your application."

// Provision preview should show creation of storage account
preview, err := cli.RunCommandWithStdIn(ctx, stdinForProvision(), "provision", "--preview")
require.NoError(t, err)
require.Contains(t, preview.Stdout, "Create : Storage account")

// First provision creates all resources
initial, err := cli.RunCommandWithStdIn(ctx, stdinForProvision(), "provision")
require.NoError(t, err)
require.NotContains(t, initial.Stdout, expectedOutputContains)

// Second preview shows no changes required for storage account
secondPreview, err := cli.RunCommandWithStdIn(ctx, stdinForProvision(), "provision", "--preview")
require.NoError(t, err)
require.NotContains(t, secondPreview.Stdout, "Skip : Storage account")

// Second provision should use cache
secondProvisionOutput, err := cli.RunCommandWithStdIn(ctx, stdinForProvision(), "provision")
require.NoError(t, err)
Expand Down
Loading
Loading