Skip to content

Commit

Permalink
tests/provider: Add missing ErrorCheck to TestCase (#18306)
Browse files Browse the repository at this point in the history
* tests/provider: Add missing ErrorCheck to TestCase

Reference: #18175

Previously:

```
aws/resource_aws_iam_group_policy_test.go:88:36: XAT001: missing ErrorCheck
aws/resource_aws_iam_group_policy_test.go:128:36: XAT001: missing ErrorCheck
aws/resource_aws_iam_instance_profile_test.go:75:36: XAT001: missing ErrorCheck
aws/resource_aws_iam_role_policy_test.go:102:36: XAT001: missing ErrorCheck
aws/resource_aws_iam_role_policy_test.go:147:36: XAT001: missing ErrorCheck
aws/resource_aws_iam_role_test.go:222:36: XAT001: missing ErrorCheck
aws/resource_aws_iam_user_policy_test.go:96:36: XAT001: missing ErrorCheck
aws/resource_aws_iam_user_policy_test.go:138:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:237:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:270:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:399:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:443:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:534:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:610:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:664:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:720:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:779:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:813:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:843:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:871:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:970:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:997:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1034:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1265:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1321:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1385:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1422:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1462:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1504:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:1564:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:3327:36: XAT001: missing ErrorCheck
aws/resource_aws_instance_test.go:3924:36: XAT001: missing ErrorCheck
aws/resource_aws_internet_gateway_test.go:143:36: XAT001: missing ErrorCheck
aws/resource_aws_internet_gateway_test.go:189:36: XAT001: missing ErrorCheck
aws/resource_aws_internet_gateway_test.go:213:36: XAT001: missing ErrorCheck
aws/resource_aws_key_pair_test.go:170:36: XAT001: missing ErrorCheck
aws/resource_aws_nat_gateway_test.go:63:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:310:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:352:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:386:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:441:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:466:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:494:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:539:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:587:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:623:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:679:36: XAT001: missing ErrorCheck
aws/resource_aws_network_acl_test.go:709:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_attachment_test.go:16:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:74:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:108:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:155:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:200:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:269:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:302:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:330:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:358:36: XAT001: missing ErrorCheck
aws/resource_aws_network_interface_test.go:398:36: XAT001: missing ErrorCheck
aws/resource_aws_opsworks_stack_test.go:228:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:231:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:281:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:316:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:354:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:398:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:416:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:735:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:770:36: XAT001: missing ErrorCheck
aws/resource_aws_route_table_test.go:913:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:686:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1058:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1238:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1273:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1317:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1354:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1390:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1416:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1449:36: XAT001: missing ErrorCheck
aws/resource_aws_security_group_test.go:1561:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:130:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:167:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:211:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:268:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:310:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:352:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:416:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:474:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:497:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:563:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:603:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:646:36: XAT001: missing ErrorCheck
aws/resource_aws_subnet_test.go:789:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_endpoint_connection_notification_test.go:19:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_endpoint_test.go:481:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:95:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:139:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:166:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:231:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:390:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:526:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:549:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_peering_connection_test.go:584:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_test.go:169:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_test.go:225:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_test.go:266:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_test.go:307:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_test.go:370:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_test.go:427:36: XAT001: missing ErrorCheck
aws/resource_aws_vpc_test.go:449:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_connection_test.go:100:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_connection_test.go:209:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_connection_test.go:317:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_connection_test.go:345:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_connection_test.go:372:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_connection_test.go:398:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_gateway_route_propagation_test.go:16:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_gateway_test.go:110:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_gateway_test.go:257:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_gateway_test.go:321:36: XAT001: missing ErrorCheck
aws/resource_aws_vpn_gateway_test.go:349:36: XAT001: missing ErrorCheck
```

* tests: Lint

Co-authored-by: Dirk Avery <dirk.avery@gmail.com>
  • Loading branch information
bflad and YakDriver authored Mar 19, 2021
1 parent 5ef790a commit 0bbf1ee
Show file tree
Hide file tree
Showing 23 changed files with 119 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aws/resource_aws_iam_group_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func TestAccAWSIAMGroupPolicy_namePrefix(t *testing.T) {
rInt := acctest.RandInt()
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: "aws_iam_group_policy.test",
Providers: testAccProviders,
CheckDestroy: testAccCheckIAMGroupPolicyDestroy,
Expand Down Expand Up @@ -127,6 +128,7 @@ func TestAccAWSIAMGroupPolicy_generatedName(t *testing.T) {
rInt := acctest.RandInt()
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: "aws_iam_group_policy.test",
Providers: testAccProviders,
CheckDestroy: testAccCheckIAMGroupPolicyDestroy,
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_iam_instance_profile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func TestAccAWSIAMInstanceProfile_namePrefix(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"name_prefix"},
Providers: testAccProviders,
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_iam_role_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ func TestAccAWSIAMRolePolicy_namePrefix(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckIAMRolePolicyDestroy,
Expand Down Expand Up @@ -146,6 +147,7 @@ func TestAccAWSIAMRolePolicy_generatedName(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckIAMRolePolicyDestroy,
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_iam_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ func TestAccAWSIAMRole_namePrefix(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"name_prefix"},
Providers: testAccProviders,
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_iam_user_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func TestAccAWSIAMUserPolicy_namePrefix(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: policyResourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckIAMUserPolicyDestroy,
Expand Down Expand Up @@ -137,6 +138,7 @@ func TestAccAWSIAMUserPolicy_generatedName(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, iam.EndpointsID),
IDRefreshName: policyResourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckIAMUserPolicyDestroy,
Expand Down
24 changes: 24 additions & 0 deletions aws/resource_aws_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ func TestAccAWSInstance_basic(t *testing.T) {
testAccPreCheck(t)
testAccPreCheckEc2ClassicOrHasDefaultVpcWithDefaultSubnets(t)
},
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -269,6 +270,7 @@ func TestAccAWSInstance_atLeastOneOtherEbsVolume(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -398,6 +400,7 @@ func TestAccAWSInstance_userDataBase64(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -442,6 +445,7 @@ func TestAccAWSInstance_GP2IopsDevice(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"ephemeral_block_device", "user_data"},
Providers: testAccProviders,
Expand Down Expand Up @@ -533,6 +537,7 @@ func TestAccAWSInstance_blockDevices(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"ephemeral_block_device"},
Providers: testAccProviders,
Expand Down Expand Up @@ -609,6 +614,7 @@ func TestAccAWSInstance_rootInstanceStore(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -663,6 +669,7 @@ func TestAccAWSInstance_noAMIEphemeralDevices(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"ephemeral_block_device"},
Providers: testAccProviders,
Expand Down Expand Up @@ -719,6 +726,7 @@ func TestAccAWSInstance_sourceDestCheck(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -778,6 +786,7 @@ func TestAccAWSInstance_disableApiTermination(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -812,6 +821,7 @@ func TestAccAWSInstance_dedicatedInstance(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"associate_public_ip_address"},
Providers: testAccProviders,
Expand Down Expand Up @@ -842,6 +852,7 @@ func TestAccAWSInstance_outpost(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSOutpostsOutposts(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"associate_public_ip_address"},
Providers: testAccProviders,
Expand Down Expand Up @@ -870,6 +881,7 @@ func TestAccAWSInstance_placementGroup(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"associate_public_ip_address"},
Providers: testAccProviders,
Expand Down Expand Up @@ -969,6 +981,7 @@ func TestAccAWSInstance_NetworkInstanceSecurityGroups(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"associate_public_ip_address"},
Providers: testAccProviders,
Expand Down Expand Up @@ -996,6 +1009,7 @@ func TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -1033,6 +1047,7 @@ func TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -1264,6 +1279,7 @@ func TestAccAWSInstance_instanceProfileChange(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -1320,6 +1336,7 @@ func TestAccAWSInstance_withIamInstanceProfile(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -1384,6 +1401,7 @@ func TestAccAWSInstance_privateIP(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -1421,6 +1439,7 @@ func TestAccAWSInstance_associatePublicIPAndPrivateIP(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"associate_public_ip_address"},
Providers: testAccProviders,
Expand Down Expand Up @@ -1461,6 +1480,7 @@ func TestAccAWSInstance_Empty_PrivateIP(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -1503,6 +1523,7 @@ func TestAccAWSInstance_keyPairCheck(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"source_dest_check"},
Providers: testAccProviders,
Expand Down Expand Up @@ -1563,6 +1584,7 @@ func TestAccAWSInstance_forceNewAndTagsDrift(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -3326,6 +3348,7 @@ func TestAccAWSInstance_metadataOptions(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInstanceDestroy,
Expand Down Expand Up @@ -3923,6 +3946,7 @@ func TestAccAWSInstance_GP3RootBlockDevice(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"ephemeral_block_device", "user_data"},
Providers: testAccProviders,
Expand Down
3 changes: 3 additions & 0 deletions aws/resource_aws_internet_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func TestAccAWSInternetGateway_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInternetGatewayDestroy,
Expand Down Expand Up @@ -188,6 +189,7 @@ func TestAccAWSInternetGateway_delete(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInternetGatewayDestroy,
Expand All @@ -212,6 +214,7 @@ func TestAccAWSInternetGateway_tags(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckInternetGatewayDestroy,
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_key_pair_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func TestAccAWSKeyPair_namePrefix(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
IDRefreshIgnore: []string{"key_name_prefix"},
Providers: testAccProviders,
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_nat_gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestAccAWSNatGateway_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckNatGatewayDestroy,
Expand Down
11 changes: 11 additions & 0 deletions aws/resource_aws_network_acl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ func TestAccAWSNetworkAcl_EgressAndIngressRules(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -351,6 +352,7 @@ func TestAccAWSNetworkAcl_OnlyIngressRules_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -385,6 +387,7 @@ func TestAccAWSNetworkAcl_OnlyIngressRules_update(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -440,6 +443,7 @@ func TestAccAWSNetworkAcl_CaseSensitivityNoChanges(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand All @@ -465,6 +469,7 @@ func TestAccAWSNetworkAcl_OnlyEgressRules(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -493,6 +498,7 @@ func TestAccAWSNetworkAcl_SubnetChange(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -538,6 +544,7 @@ func TestAccAWSNetworkAcl_Subnets(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -586,6 +593,7 @@ func TestAccAWSNetworkAcl_SubnetsDelete(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -622,6 +630,7 @@ func TestAccAWSNetworkAcl_ipv6Rules(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -678,6 +687,7 @@ func TestAccAWSNetworkAcl_ipv6VpcRules(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down Expand Up @@ -708,6 +718,7 @@ func TestAccAWSNetworkAcl_espProtocol(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: resourceName,
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSNetworkAclDestroy,
Expand Down
1 change: 1 addition & 0 deletions aws/resource_aws_network_interface_attachment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func TestAccAWSNetworkInterfaceAttachment_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ErrorCheck: testAccErrorCheck(t, ec2.EndpointsID),
IDRefreshName: "aws_network_interface.bar",
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSENIDestroy,
Expand Down
Loading

0 comments on commit 0bbf1ee

Please sign in to comment.