Skip to content

Commit

Permalink
Upgrade test validate no replacements (#2132)
Browse files Browse the repository at this point in the history
The upgrade tests here were using the no-diff validation yielding noise
in the tests as can be seen here:
https://github.com/pulumi/pulumi-azure/actions/runs/9505545675/job/26201251247?pr=2125

The tests there fail because of default properties applied to storage
account and storage bucket. The azure provider is especially prone to
dirty refreshes because of a policy the upstream provider has AGAINST
setting Optional + Computed for properties returned by the API:
https://github.com/hashicorp/terraform-provider-azurerm/blob/main/contributing/topics/best-practices.md#setting-properties-to-optional--computed

No diff is too strict for upgrade tests so this PR replaces it with "no
replacements".
  • Loading branch information
VenelinMartinov authored Jun 17, 2024
1 parent c0efd70 commit 2373dee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func test(t *testing.T, dir string, opts ...providertest.Option) {
providertest.WithBaselineVersion("5.60.0"),
providertest.WithResourceProviderServer(providerServer()),
providertest.WithSkippedUpgradeTestMode(providertest.UpgradeTestMode_Quick, "Using PreviewOnly mode instead"),
providertest.WithDiffValidation(providertest.NoReplacements()),
)
ptest := providertest.NewProviderTest(dir, opts...)
ptest.Run(t)
Expand Down

0 comments on commit 2373dee

Please sign in to comment.