Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch from resource.Test() to resource.ParallelTest() #92

Merged
merged 1 commit into from
Jun 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurestack/data_source_client_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestAccDataSourceAzureStackClientConfig_basic(t *testing.T) {
tenantId := os.Getenv("ARM_TENANT_ID")
subscriptionId := os.Getenv("ARM_SUBSCRIPTION_ID")

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_network_interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestAccDataSourceArmVirtualNetworkInterface_basic(t *testing.T) {

name := fmt.Sprintf("acctest-nic-%d", ri)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
6 changes: 3 additions & 3 deletions azurestack/data_source_network_security_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestAccDataSourceAzureStackNetworkSecurityGroup_basic(t *testing.T) {
location := testLocation()
config := testAccDataSourceAzureStackNetworkSecurityGroupBasic(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackNetworkSecurityGroupDestroy,
Expand All @@ -37,7 +37,7 @@ func TestAccDataSourceAzureStackNetworkSecurityGroup_rules(t *testing.T) {
location := testLocation()
config := testAccDataSourceAzureStackNetworkSecurityGroupWithRules(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackNetworkSecurityGroupDestroy,
Expand Down Expand Up @@ -69,7 +69,7 @@ func TestAccDataSourceAzureStackNetworkSecurityGroup_tags(t *testing.T) {
location := testLocation()
config := testAccDataSourceAzureStackNetworkSecurityGroupTags(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackNetworkSecurityGroupDestroy,
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_public_ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestAccDataAzureStackPublicIP_basic(t *testing.T) {

config := testAccDataAzureStackPublicIPBasic(name, resourceGroupName, ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackPublicIpDestroy,
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_resource_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestAccDataSourceAzureStackResourceGroup_basic(t *testing.T) {
name := fmt.Sprintf("acctestRg_%d", ri)
location := testLocation()

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
6 changes: 3 additions & 3 deletions azurestack/data_source_route_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestAccDataSourceAzureStackRouteTable_basic(t *testing.T) {
location := testLocation()
config := testAccDataSourceAzureStackRouteTable_basic(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackRouteTableDestroy,
Expand All @@ -36,7 +36,7 @@ func TestAccDataSourceAzureStackRouteTable_singleRoute(t *testing.T) {
location := testLocation()
config := testAccDataSourceAzureStackRouteTable_singleRoute(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackRouteTableDestroy,
Expand All @@ -61,7 +61,7 @@ func TestAccDataSourceAzureStackRouteTable_multipleRoutes(t *testing.T) {
location := testLocation()
config := testAccDataSourceAzureStackRouteTable_multipleRoutes(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackRouteTableDestroy,
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_storage_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestAccDataSourceAzureStackStorageAccount_basic(t *testing.T) {
preConfig := testAccDataSourceAzureStackStorageAccount_basic(ri, rs, location)
config := testAccDataSourceAzureStackStorageAccount_basicWithDataSource(ri, rs, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackStorageAccountDestroy,
Expand Down
6 changes: 3 additions & 3 deletions azurestack/data_source_subnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestAccDataSourceArmSubnet_basic(t *testing.T) {
resourceName := "data.azurestack_subnet.test"
ri := acctest.RandInt()

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand All @@ -35,7 +35,7 @@ func TestAccDataSourceArmSubnet_networkSecurityGroup(t *testing.T) {
dataSourceName := "data.azurestack_subnet.test"
ri := acctest.RandInt()

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand All @@ -58,7 +58,7 @@ func TestAccDataSourceArmSubnet_routeTable(t *testing.T) {
dataSourceName := "data.azurestack_subnet.test"
ri := acctest.RandInt()

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
2 changes: 1 addition & 1 deletion azurestack/data_source_virtual_network_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestAccAzureStackDataSourceVirtualNetworkGateway_basic(t *testing.T) {
ri := acctest.RandInt()
config := testAccAzureStackDataSourceVirtualNetworkGateway_basic(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackVirtualNetworkGatewayDestroy,
Expand Down
4 changes: 2 additions & 2 deletions azurestack/data_source_virtual_network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestAccDataSourceArmVirtualNetwork_basic(t *testing.T) {
name := fmt.Sprintf("acctestvnet-%d", ri)
config := testAccDataSourceArmVirtualNetwork_basic(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -43,7 +43,7 @@ func TestAccDataSourceArmVirtualNetwork_peering(t *testing.T) {
virtualNetworkName := fmt.Sprintf("acctestvnet-1-%d", ri)
location := testLocation()

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
Expand Down
10 changes: 5 additions & 5 deletions azurestack/resource_arm_availability_set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestAccAzureStackAvailabilitySet_basic(t *testing.T) {
ri := acctest.RandInt()
config := testAccAzureStackAvailabilitySet_basic(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackAvailabilitySetDestroy,
Expand All @@ -42,7 +42,7 @@ func TestAccAzureStackAvailabilitySet_disappears(t *testing.T) {
ri := acctest.RandInt()
config := testAccAzureStackAvailabilitySet_basic(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackAvailabilitySetDestroy,
Expand All @@ -68,7 +68,7 @@ func TestAccAzureStackAvailabilitySet_withTags(t *testing.T) {
preConfig := testAccAzureStackAvailabilitySet_withTags(ri, location)
postConfig := testAccAzureStackAvailabilitySet_withUpdatedTags(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackAvailabilitySetDestroy,
Expand Down Expand Up @@ -104,7 +104,7 @@ func TestAccAzureStackAvailabilitySet_withDomainCounts(t *testing.T) {
ri := acctest.RandInt()
config := testAccAzureStackAvailabilitySet_withDomainCounts(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackAvailabilitySetDestroy,
Expand Down Expand Up @@ -135,7 +135,7 @@ func TestAccAzureStackAvailabilitySet_managed(t *testing.T) {
ri := acctest.RandInt()
config := testAccAzureStackAvailabilitySet_managed(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackAvailabilitySetDestroy,
Expand Down
6 changes: 3 additions & 3 deletions azurestack/resource_arm_dns_a_record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestAccAzureStackDnsARecord_basic(t *testing.T) {
ri := acctest.RandInt()
config := testAccAzureStackDnsARecord_basic(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackDnsARecordDestroy,
Expand All @@ -38,7 +38,7 @@ func TestAccAzureStackDnsARecord_updateRecords(t *testing.T) {
preConfig := testAccAzureStackDnsARecord_basic(ri, location)
postConfig := testAccAzureStackDnsARecord_updateRecords(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackDnsARecordDestroy,
Expand Down Expand Up @@ -68,7 +68,7 @@ func TestAccAzureStackDnsARecord_withTags(t *testing.T) {
preConfig := testAccAzureStackDnsARecord_withTags(ri, location)
postConfig := testAccAzureStackDnsARecord_withTagsUpdate(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackDnsARecordDestroy,
Expand Down
4 changes: 2 additions & 2 deletions azurestack/resource_arm_dns_zone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestAccAzureStackDnsZone_basic(t *testing.T) {
ri := acctest.RandInt()
config := testAccAzureStackDnsZone_basic(ri, testLocation())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackDnsZoneDestroy,
Expand All @@ -37,7 +37,7 @@ func TestAccAzureStackDnsZone_withTags(t *testing.T) {
preConfig := testAccAzureStackDnsZone_withTags(ri, location)
postConfig := testAccAzureStackDnsZone_withTagsUpdate(ri, location)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackDnsZoneDestroy,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestAccAzureStackLoadBalancerBackEndAddressPool_basic(t *testing.T) {
"/subscriptions/%s/resourceGroups/acctestRG-%d/providers/Microsoft.Network/loadBalancers/arm-test-loadbalancer-%d/backendAddressPools/%s",
subscriptionID, ri, ri, addressPoolName)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down Expand Up @@ -49,7 +49,7 @@ func TestAccAzureStackLoadBalancerBackEndAddressPool_removal(t *testing.T) {
ri := acctest.RandInt()
addressPoolName := fmt.Sprintf("%d-address-pool", ri)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand All @@ -70,7 +70,7 @@ func TestAccAzureStackLoadBalancerBackEndAddressPool_disappears(t *testing.T) {
ri := acctest.RandInt()
addressPoolName := fmt.Sprintf("%d-address-pool", ri)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down
8 changes: 4 additions & 4 deletions azurestack/resource_arm_loadbalancer_nat_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestAccAzureStackLoadBalancerNatPool_basic(t *testing.T) {
"/subscriptions/%s/resourceGroups/acctestRG-%d/providers/Microsoft.Network/loadBalancers/arm-test-loadbalancer-%d/inboundNatPools/%s",
subscriptionID, ri, ri, natPoolName)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down Expand Up @@ -49,7 +49,7 @@ func TestAccAzureStackLoadBalancerNatPool_removal(t *testing.T) {
ri := acctest.RandInt()
natPoolName := fmt.Sprintf("NatPool-%d", ri)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestAccAzureStackLoadBalancerNatPool_update(t *testing.T) {
natPoolName := fmt.Sprintf("NatPool-%d", ri)
natPool2Name := fmt.Sprintf("NatPool-%d", acctest.RandInt())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down Expand Up @@ -110,7 +110,7 @@ func TestAccAzureStackLoadBalancerNatPool_disappears(t *testing.T) {
ri := acctest.RandInt()
natPoolName := fmt.Sprintf("NatPool-%d", ri)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down
12 changes: 6 additions & 6 deletions azurestack/resource_arm_loadbalancer_nat_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestAccAzureStackLoadBalancerNatRule_basic(t *testing.T) {
"/subscriptions/%s/resourceGroups/acctestRG-%d/providers/Microsoft.Network/loadBalancers/arm-test-loadbalancer-%d/inboundNatRules/%s",
subscriptionID, ri, ri, natRuleName)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down Expand Up @@ -49,7 +49,7 @@ func TestAccAzureStackLoadBalancerNatRule_removal(t *testing.T) {
ri := acctest.RandInt()
natRuleName := fmt.Sprintf("NatRule-%d", ri)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down Expand Up @@ -78,7 +78,7 @@ func TestAccAzureStackLoadBalancerNatRule_update(t *testing.T) {
natRuleName := fmt.Sprintf("NatRule-%d", ri)
natRule2Name := fmt.Sprintf("NatRule-%d", acctest.RandInt())

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down Expand Up @@ -112,7 +112,7 @@ func TestAccAzureStackLoadBalancerNatRule_disappears(t *testing.T) {
ri := acctest.RandInt()
natRuleName := fmt.Sprintf("NatRule-%d", ri)

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand All @@ -136,7 +136,7 @@ func TestAccAzureStackLoadBalancerNatRule_enableFloatingIP(t *testing.T) {
natRuleName := fmt.Sprintf("NatRule-%d", ri)
location := testLocation()

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand All @@ -158,7 +158,7 @@ func TestAccAzureStackLoadBalancerNatRule_disableFloatingIP(t *testing.T) {
natRuleName := fmt.Sprintf("NatRule-%d", ri)
location := testLocation()

resource.Test(t, resource.TestCase{
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureStackLoadBalancerDestroy,
Expand Down
Loading