@@ -66,8 +66,6 @@ func Test_RdsExample(t *testing.T) {
6666}
6767
6868func Test_Azure_VirtualNetworkExample_NoExplicitProvider (t * testing.T ) {
69- t .Parallel ()
70-
7169 if _ , ci := os .LookupEnv ("CI" ); ! ci {
7270 t .Skip ("Skipping Azure tests in local runs without credentials." )
7371 }
@@ -88,17 +86,43 @@ func Test_Azure_VirtualNetworkExample_NoExplicitProvider(t *testing.T) {
8886 pulumiPackageAdd (t , integrationTest , localProviderBinPath ,
8987 "Azure/avm-res-network-virtualnetwork/azurerm" , "0.8.1" , "vnet" )
9088
91- integrationTest .Up (t , optup .Diff (),
92- optup .ErrorProgressStreams (tw ),
93- optup .ProgressStreams (tw ),
94- )
95-
96- integrationTest .Preview (t ,
97- optpreview .Diff (),
98- optpreview .ExpectNoChanges (),
99- optpreview .ErrorProgressStreams (tw ),
100- optpreview .ProgressStreams (tw ),
101- )
89+ // resource group name
90+ resourceGroupName := generateTestResourcePrefix ()
91+ integrationTest .SetConfig (t , "rg" , resourceGroupName + "-resource-group" )
92+
93+ t .Run ("up" , func (t * testing.T ) {
94+ // for debugging generated Terraform files during up
95+ terraformFiles := filepath .Join (testProgram , "up" )
96+ t .Setenv ("PULUMI_TERRAFORM_MODULE_WRITE_TF_FILE" , terraformFiles )
97+ t .Cleanup (func () {
98+ cleanRandomDataFromTerraformArtifacts (t , terraformFiles , map [string ]string {
99+ resourceGroupName : "RESOURCE_GROUP" ,
100+ })
101+ })
102+
103+ integrationTest .Up (t , optup .Diff (),
104+ optup .ErrorProgressStreams (tw ),
105+ optup .ProgressStreams (tw ),
106+ )
107+ })
108+
109+ t .Run ("preview" , func (t * testing.T ) {
110+ // for debugging generated Terraform files during preview
111+ terraformFiles := filepath .Join (testProgram , "preview" )
112+ t .Setenv ("PULUMI_TERRAFORM_MODULE_WRITE_TF_FILE" , terraformFiles )
113+ t .Cleanup (func () {
114+ cleanRandomDataFromTerraformArtifacts (t , terraformFiles , map [string ]string {
115+ resourceGroupName : "RESOURCE_GROUP" ,
116+ })
117+ })
118+
119+ integrationTest .Preview (t ,
120+ optpreview .Diff (),
121+ optpreview .ExpectNoChanges (),
122+ optpreview .ErrorProgressStreams (tw ),
123+ optpreview .ProgressStreams (tw ),
124+ )
125+ })
102126}
103127
104128func Test_EksExample (t * testing.T ) {
0 commit comments