Skip to content

Commit 3dc9dc7

Browse files
Add DSFs to references in snapshot tests (and other MM-generated tests) (#3930) (#2445)
Signed-off-by: Modular Magician <[email protected]>
1 parent 09adcca commit 3dc9dc7

File tree

40 files changed

+287
-216
lines changed

40 files changed

+287
-216
lines changed

.changelog/3930.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
```release-note:none
2+
```

google-beta/resource_compute_address_generated_test.go

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ func TestAccComputeAddress_addressBasicExample(t *testing.T) {
3939
Config: testAccComputeAddress_addressBasicExample(context),
4040
},
4141
{
42-
ResourceName: "google_compute_address.ip_address",
43-
ImportState: true,
44-
ImportStateVerify: true,
42+
ResourceName: "google_compute_address.ip_address",
43+
ImportState: true,
44+
ImportStateVerify: true,
45+
ImportStateVerifyIgnore: []string{"subnetwork", "region"},
4546
},
4647
},
4748
})
@@ -71,9 +72,10 @@ func TestAccComputeAddress_addressWithSubnetworkExample(t *testing.T) {
7172
Config: testAccComputeAddress_addressWithSubnetworkExample(context),
7273
},
7374
{
74-
ResourceName: "google_compute_address.internal_with_subnet_and_address",
75-
ImportState: true,
76-
ImportStateVerify: true,
75+
ResourceName: "google_compute_address.internal_with_subnet_and_address",
76+
ImportState: true,
77+
ImportStateVerify: true,
78+
ImportStateVerifyIgnore: []string{"subnetwork", "region"},
7779
},
7880
},
7981
})
@@ -118,9 +120,10 @@ func TestAccComputeAddress_addressWithGceEndpointExample(t *testing.T) {
118120
Config: testAccComputeAddress_addressWithGceEndpointExample(context),
119121
},
120122
{
121-
ResourceName: "google_compute_address.internal_with_gce_endpoint",
122-
ImportState: true,
123-
ImportStateVerify: true,
123+
ResourceName: "google_compute_address.internal_with_gce_endpoint",
124+
ImportState: true,
125+
ImportStateVerify: true,
126+
ImportStateVerifyIgnore: []string{"subnetwork", "region"},
124127
},
125128
},
126129
})
@@ -182,9 +185,10 @@ func TestAccComputeAddress_instanceWithIpExample(t *testing.T) {
182185
Config: testAccComputeAddress_instanceWithIpExample(context),
183186
},
184187
{
185-
ResourceName: "google_compute_address.static",
186-
ImportState: true,
187-
ImportStateVerify: true,
188+
ResourceName: "google_compute_address.static",
189+
ImportState: true,
190+
ImportStateVerify: true,
191+
ImportStateVerifyIgnore: []string{"subnetwork", "region"},
188192
},
189193
},
190194
})

google-beta/resource_compute_autoscaler_generated_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ func TestAccComputeAutoscaler_autoscalerBasicExample(t *testing.T) {
141141
Config: testAccComputeAutoscaler_autoscalerBasicExample(context),
142142
},
143143
{
144-
ResourceName: "google_compute_autoscaler.foobar",
145-
ImportState: true,
146-
ImportStateVerify: true,
144+
ResourceName: "google_compute_autoscaler.foobar",
145+
ImportState: true,
146+
ImportStateVerify: true,
147+
ImportStateVerifyIgnore: []string{"target", "zone"},
147148
},
148149
},
149150
})

google-beta/resource_compute_disk_generated_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ func TestAccComputeDisk_diskBasicExample(t *testing.T) {
3939
Config: testAccComputeDisk_diskBasicExample(context),
4040
},
4141
{
42-
ResourceName: "google_compute_disk.default",
43-
ImportState: true,
44-
ImportStateVerify: true,
42+
ResourceName: "google_compute_disk.default",
43+
ImportState: true,
44+
ImportStateVerify: true,
45+
ImportStateVerifyIgnore: []string{"type", "zone", "snapshot"},
4546
},
4647
},
4748
})

google-beta/resource_compute_firewall_generated_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ func TestAccComputeFirewall_firewallBasicExample(t *testing.T) {
3939
Config: testAccComputeFirewall_firewallBasicExample(context),
4040
},
4141
{
42-
ResourceName: "google_compute_firewall.default",
43-
ImportState: true,
44-
ImportStateVerify: true,
42+
ResourceName: "google_compute_firewall.default",
43+
ImportState: true,
44+
ImportStateVerify: true,
45+
ImportStateVerifyIgnore: []string{"network"},
4546
},
4647
},
4748
})

google-beta/resource_compute_forwarding_rule_generated_test.go

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ func TestAccComputeForwardingRule_forwardingRuleGlobalInternallbExample(t *testi
3939
Config: testAccComputeForwardingRule_forwardingRuleGlobalInternallbExample(context),
4040
},
4141
{
42-
ResourceName: "google_compute_forwarding_rule.default",
43-
ImportState: true,
44-
ImportStateVerify: true,
42+
ResourceName: "google_compute_forwarding_rule.default",
43+
ImportState: true,
44+
ImportStateVerify: true,
45+
ImportStateVerifyIgnore: []string{"backend_service", "network", "subnetwork", "region"},
4546
},
4647
},
4748
})
@@ -102,9 +103,10 @@ func TestAccComputeForwardingRule_forwardingRuleBasicExample(t *testing.T) {
102103
Config: testAccComputeForwardingRule_forwardingRuleBasicExample(context),
103104
},
104105
{
105-
ResourceName: "google_compute_forwarding_rule.default",
106-
ImportState: true,
107-
ImportStateVerify: true,
106+
ResourceName: "google_compute_forwarding_rule.default",
107+
ImportState: true,
108+
ImportStateVerify: true,
109+
ImportStateVerifyIgnore: []string{"backend_service", "network", "subnetwork", "region"},
108110
},
109111
},
110112
})
@@ -140,9 +142,10 @@ func TestAccComputeForwardingRule_forwardingRuleInternallbExample(t *testing.T)
140142
Config: testAccComputeForwardingRule_forwardingRuleInternallbExample(context),
141143
},
142144
{
143-
ResourceName: "google_compute_forwarding_rule.default",
144-
ImportState: true,
145-
ImportStateVerify: true,
145+
ResourceName: "google_compute_forwarding_rule.default",
146+
ImportState: true,
147+
ImportStateVerify: true,
148+
ImportStateVerifyIgnore: []string{"backend_service", "network", "subnetwork", "region"},
146149
},
147150
},
148151
})

google-beta/resource_compute_global_address_generated_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ func TestAccComputeGlobalAddress_globalAddressBasicExample(t *testing.T) {
3939
Config: testAccComputeGlobalAddress_globalAddressBasicExample(context),
4040
},
4141
{
42-
ResourceName: "google_compute_global_address.default",
43-
ImportState: true,
44-
ImportStateVerify: true,
42+
ResourceName: "google_compute_global_address.default",
43+
ImportState: true,
44+
ImportStateVerify: true,
45+
ImportStateVerifyIgnore: []string{"network"},
4546
},
4647
},
4748
})

google-beta/resource_compute_global_forwarding_rule_generated_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ func TestAccComputeGlobalForwardingRule_globalForwardingRuleHttpExample(t *testi
3939
Config: testAccComputeGlobalForwardingRule_globalForwardingRuleHttpExample(context),
4040
},
4141
{
42-
ResourceName: "google_compute_global_forwarding_rule.default",
43-
ImportState: true,
44-
ImportStateVerify: true,
42+
ResourceName: "google_compute_global_forwarding_rule.default",
43+
ImportState: true,
44+
ImportStateVerify: true,
45+
ImportStateVerifyIgnore: []string{"network"},
4546
},
4647
},
4748
})

google-beta/resource_compute_image_generated_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestAccComputeImage_imageBasicExample(t *testing.T) {
4242
ResourceName: "google_compute_image.example",
4343
ImportState: true,
4444
ImportStateVerify: true,
45-
ImportStateVerifyIgnore: []string{"raw_disk"},
45+
ImportStateVerifyIgnore: []string{"raw_disk", "source_disk", "source_image", "source_snapshot"},
4646
},
4747
},
4848
})
@@ -79,7 +79,7 @@ func TestAccComputeImage_imageGuestOsExample(t *testing.T) {
7979
ResourceName: "google_compute_image.example",
8080
ImportState: true,
8181
ImportStateVerify: true,
82-
ImportStateVerifyIgnore: []string{"raw_disk"},
82+
ImportStateVerifyIgnore: []string{"raw_disk", "source_disk", "source_image", "source_snapshot"},
8383
},
8484
},
8585
})

google-beta/resource_compute_network_endpoint_group_generated_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ func TestAccComputeNetworkEndpointGroup_networkEndpointGroupExample(t *testing.T
3939
Config: testAccComputeNetworkEndpointGroup_networkEndpointGroupExample(context),
4040
},
4141
{
42-
ResourceName: "google_compute_network_endpoint_group.neg",
43-
ImportState: true,
44-
ImportStateVerify: true,
42+
ResourceName: "google_compute_network_endpoint_group.neg",
43+
ImportState: true,
44+
ImportStateVerify: true,
45+
ImportStateVerifyIgnore: []string{"network", "subnetwork", "zone"},
4546
},
4647
},
4748
})

0 commit comments

Comments
 (0)