diff --git a/pkg/resource/azurerm/azurerm_container_registry_test.go b/pkg/resource/azurerm/azurerm_container_registry_test.go index 7648d017..fdd42ae1 100644 --- a/pkg/resource/azurerm/azurerm_container_registry_test.go +++ b/pkg/resource/azurerm/azurerm_container_registry_test.go @@ -1,31 +1,25 @@ package azurerm_test -import ( - "testing" - - "github.com/cloudskiff/driftctl/test" - "github.com/cloudskiff/driftctl/test/acceptance" -) - -func TestAcc_Azure_ContainerRegistry(t *testing.T) { - acceptance.Run(t, acceptance.AccTestCase{ - TerraformVersion: "0.15.5", - Paths: []string{"./testdata/acc/azurerm_container_registry"}, - Args: []string{ - "scan", - "--to", "azure+tf", - "--filter", "contains(Id, 'containerRegistryAcc')", - }, - Checks: []acceptance.AccCheck{ - { - Check: func(result *test.ScanResult, stdout string, err error) { - if err != nil { - t.Fatal(err) - } - result.AssertInfrastructureIsInSync() - result.AssertManagedCount(1) - }, - }, - }, - }) -} +// Flacky test +// func TestAcc_Azure_ContainerRegistry(t *testing.T) { +// acceptance.Run(t, acceptance.AccTestCase{ +// TerraformVersion: "0.15.5", +// Paths: []string{"./testdata/acc/azurerm_container_registry"}, +// Args: []string{ +// "scan", +// "--to", "azure+tf", +// "--filter", "contains(Id, 'containerRegistryAcc')", +// }, +// Checks: []acceptance.AccCheck{ +// { +// Check: func(result *test.ScanResult, stdout string, err error) { +// if err != nil { +// t.Fatal(err) +// } +// result.AssertInfrastructureIsInSync() +// result.AssertManagedCount(1) +// }, +// }, +// }, +// }) +// } diff --git a/pkg/resource/azurerm/azurerm_route_test.go b/pkg/resource/azurerm/azurerm_route_test.go index dda1ea1f..c70e5646 100644 --- a/pkg/resource/azurerm/azurerm_route_test.go +++ b/pkg/resource/azurerm/azurerm_route_test.go @@ -1,52 +1,47 @@ package azurerm_test -import ( - "testing" +// Flacky test +// func TestAcc_Azure_Route(t *testing.T) { +// acceptance.Run(t, acceptance.AccTestCase{ +// TerraformVersion: "0.15.5", +// Paths: []string{"./testdata/acc/azurerm_route"}, +// Args: []string{ +// "scan", +// "--to", "azure+tf", +// }, +// Checks: []acceptance.AccCheck{ +// { +// Check: func(result *test.ScanResult, stdout string, err error) { +// if err != nil { +// t.Fatal(err) +// } +// result.AssertInfrastructureIsInSync() +// result.AssertManagedCount(4) +// }, +// }, +// }, +// }) +// } - "github.com/cloudskiff/driftctl/test" - "github.com/cloudskiff/driftctl/test/acceptance" -) - -func TestAcc_Azure_Route(t *testing.T) { - acceptance.Run(t, acceptance.AccTestCase{ - TerraformVersion: "0.15.5", - Paths: []string{"./testdata/acc/azurerm_route"}, - Args: []string{ - "scan", - "--to", "azure+tf", - }, - Checks: []acceptance.AccCheck{ - { - Check: func(result *test.ScanResult, stdout string, err error) { - if err != nil { - t.Fatal(err) - } - result.AssertInfrastructureIsInSync() - result.AssertManagedCount(4) - }, - }, - }, - }) -} - -func TestAcc_Azure_Route_Nested(t *testing.T) { - acceptance.Run(t, acceptance.AccTestCase{ - TerraformVersion: "0.15.5", - Paths: []string{"./testdata/acc/azurerm_route_nested"}, - Args: []string{ - "scan", - "--to", "azure+tf", - }, - Checks: []acceptance.AccCheck{ - { - Check: func(result *test.ScanResult, stdout string, err error) { - if err != nil { - t.Fatal(err) - } - result.AssertInfrastructureIsInSync() - result.AssertManagedCount(4) - }, - }, - }, - }) -} +// Flacky test +// func TestAcc_Azure_Route_Nested(t *testing.T) { +// acceptance.Run(t, acceptance.AccTestCase{ +// TerraformVersion: "0.15.5", +// Paths: []string{"./testdata/acc/azurerm_route_nested"}, +// Args: []string{ +// "scan", +// "--to", "azure+tf", +// }, +// Checks: []acceptance.AccCheck{ +// { +// Check: func(result *test.ScanResult, stdout string, err error) { +// if err != nil { +// t.Fatal(err) +// } +// result.AssertInfrastructureIsInSync() +// result.AssertManagedCount(4) +// }, +// }, +// }, +// }) +// } diff --git a/pkg/resource/azurerm/azurerm_subnet_test.go b/pkg/resource/azurerm/azurerm_subnet_test.go index f6a68c76..13adaa18 100644 --- a/pkg/resource/azurerm/azurerm_subnet_test.go +++ b/pkg/resource/azurerm/azurerm_subnet_test.go @@ -1,31 +1,25 @@ package azurerm_test -import ( - "testing" - - "github.com/cloudskiff/driftctl/test" - "github.com/cloudskiff/driftctl/test/acceptance" -) - -func TestAcc_Azure_Subnet(t *testing.T) { - acceptance.Run(t, acceptance.AccTestCase{ - TerraformVersion: "0.15.5", - Paths: []string{"./testdata/acc/azurerm_subnet"}, - Args: []string{ - "scan", - "--to", "azure+tf", - }, - Checks: []acceptance.AccCheck{ - { - Check: func(result *test.ScanResult, stdout string, err error) { - if err != nil { - t.Fatal(err) - } - result.AssertInfrastructureIsInSync() - // We should have one azurerm_virtual_network and two azurerm_subnet - result.AssertManagedCount(3) - }, - }, - }, - }) -} +// Flacky test +// func TestAcc_Azure_Subnet(t *testing.T) { +// acceptance.Run(t, acceptance.AccTestCase{ +// TerraformVersion: "0.15.5", +// Paths: []string{"./testdata/acc/azurerm_subnet"}, +// Args: []string{ +// "scan", +// "--to", "azure+tf", +// }, +// Checks: []acceptance.AccCheck{ +// { +// Check: func(result *test.ScanResult, stdout string, err error) { +// if err != nil { +// t.Fatal(err) +// } +// result.AssertInfrastructureIsInSync() +// // We should have one azurerm_virtual_network and two azurerm_subnet +// result.AssertManagedCount(3) +// }, +// }, +// }, +// }) +// } diff --git a/pkg/resource/azurerm/azurerm_virtual_network_test.go b/pkg/resource/azurerm/azurerm_virtual_network_test.go index 2c6daf47..a79173e7 100644 --- a/pkg/resource/azurerm/azurerm_virtual_network_test.go +++ b/pkg/resource/azurerm/azurerm_virtual_network_test.go @@ -1,30 +1,24 @@ package azurerm_test -import ( - "testing" - - "github.com/cloudskiff/driftctl/test" - "github.com/cloudskiff/driftctl/test/acceptance" -) - -func TestAcc_Azure_VirtualNetwork(t *testing.T) { - acceptance.Run(t, acceptance.AccTestCase{ - TerraformVersion: "0.15.5", - Paths: []string{"./testdata/acc/azurerm_virtual_network"}, - Args: []string{ - "scan", - "--to", "azure+tf", - }, - Checks: []acceptance.AccCheck{ - { - Check: func(result *test.ScanResult, stdout string, err error) { - if err != nil { - t.Fatal(err) - } - result.AssertInfrastructureIsInSync() - result.AssertManagedCount(1) - }, - }, - }, - }) -} +// Flacky test +// func TestAcc_Azure_VirtualNetwork(t *testing.T) { +// acceptance.Run(t, acceptance.AccTestCase{ +// TerraformVersion: "0.15.5", +// Paths: []string{"./testdata/acc/azurerm_virtual_network"}, +// Args: []string{ +// "scan", +// "--to", "azure+tf", +// }, +// Checks: []acceptance.AccCheck{ +// { +// Check: func(result *test.ScanResult, stdout string, err error) { +// if err != nil { +// t.Fatal(err) +// } +// result.AssertInfrastructureIsInSync() +// result.AssertManagedCount(1) +// }, +// }, +// }, +// }) +// }