driftctl/pkg/resource/google/google_compute_firewall_tes...

35 lines
802 B
Go
Raw Normal View History

2021-09-14 13:11:28 +00:00
package google_test
import (
"testing"
"time"
2021-09-14 13:11:28 +00:00
2021-12-06 13:29:39 +00:00
"github.com/snyk/driftctl/test"
"github.com/snyk/driftctl/test/acceptance"
2021-09-14 13:11:28 +00:00
)
func TestAcc_Google_ComputeFirewall(t *testing.T) {
acceptance.Run(t, acceptance.AccTestCase{
TerraformVersion: "0.15.5",
Paths: []string{"./testdata/acc/google_compute_firewall"},
Args: []string{
"scan",
"--to", "gcp+tf",
"--deep",
},
Checks: []acceptance.AccCheck{
{
// New resources are not visible immediately through GCP API after an apply operation.
ShouldRetry: acceptance.LinearBackoff(10 * time.Minute),
2021-09-14 13:11:28 +00:00
Check: func(result *test.ScanResult, stdout string, err error) {
if err != nil {
t.Fatal(err)
}
2021-10-05 08:20:31 +00:00
result.AssertInfrastructureIsInSync()
2021-09-14 13:11:28 +00:00
result.AssertManagedCount(3)
},
},
},
})
}