Disabled azure flacky test

main
Elie 2021-11-19 10:38:18 +01:00
parent 81a9cdb9df
commit 332b66eeca
No known key found for this signature in database
GPG Key ID: 399AF69092C727B6
4 changed files with 112 additions and 135 deletions

View File

@ -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)
// },
// },
// },
// })
// }

View File

@ -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)
// },
// },
// },
// })
// }

View File

@ -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)
// },
// },
// },
// })
// }

View File

@ -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)
// },
// },
// },
// })
// }