Skip to content

Commit

Permalink
Skip google_compute_instance_from_template in missing test detector (G…
Browse files Browse the repository at this point in the history
…oogleCloudPlatform#9640)

* Skip google_compute_instance_from_template in missing test detector

* Also skip _from_machine_image
  • Loading branch information
trodge authored and kapreus committed Jan 2, 2024
1 parent d9993bf commit 20ae2cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/missing-test-detector/changed.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ func changedResourceFields() map[string]ResourceChanges {
func resourceMapChanges(oldResourceMap, newResourceMap map[string]*schema.Resource) map[string]ResourceChanges {
changes := make(map[string]ResourceChanges)
for resourceName, newResource := range newResourceMap {
if resourceName == "google_compute_instance_from_template" || resourceName == "google_compute_instance_from_machine_image" {
// This resource is skipped because its changes can be covered by google_compute_instance.
continue
}
if fields := changedFields(oldResourceMap[resourceName], newResource, false); len(fields) > 0 {
changes[resourceName] = fields
}
Expand Down

0 comments on commit 20ae2cd

Please sign in to comment.