From 0cb5c4d9b2617d857203e9f25b1ee0e0396b51c3 Mon Sep 17 00:00:00 2001 From: Dirk Avery Date: Fri, 23 Oct 2020 14:40:45 -0400 Subject: [PATCH] tests/provider: Add prechecks (OpsWorks) --- aws/resource_aws_opsworks_application_test.go | 2 +- ...resource_aws_opsworks_custom_layer_test.go | 6 ++-- ...esource_aws_opsworks_ganglia_layer_test.go | 4 +-- ...esource_aws_opsworks_haproxy_layer_test.go | 4 +-- aws/resource_aws_opsworks_instance_test.go | 4 +-- ...source_aws_opsworks_java_app_layer_test.go | 4 +-- ...ource_aws_opsworks_memcached_layer_test.go | 4 +-- aws/resource_aws_opsworks_mysql_layer_test.go | 4 +-- ...urce_aws_opsworks_nodejs_app_layer_test.go | 4 +-- aws/resource_aws_opsworks_permission_test.go | 4 +-- ...esource_aws_opsworks_php_app_layer_test.go | 4 +-- ...ource_aws_opsworks_rails_app_layer_test.go | 4 +-- ...ource_aws_opsworks_rds_db_instance_test.go | 2 +- aws/resource_aws_opsworks_stack_test.go | 30 +++++++++++++++---- ...urce_aws_opsworks_static_web_layer_test.go | 4 +-- ...resource_aws_opsworks_user_profile_test.go | 2 +- 16 files changed, 53 insertions(+), 33 deletions(-) diff --git a/aws/resource_aws_opsworks_application_test.go b/aws/resource_aws_opsworks_application_test.go index 16fac5afc75d..0e703fe15801 100644 --- a/aws/resource_aws_opsworks_application_test.go +++ b/aws/resource_aws_opsworks_application_test.go @@ -20,7 +20,7 @@ func TestAccAWSOpsworksApplication_basic(t *testing.T) { resourceName := "aws_opsworks_application.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksApplicationDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_custom_layer_test.go b/aws/resource_aws_opsworks_custom_layer_test.go index 074ee459ed6c..c3b4d9979b35 100644 --- a/aws/resource_aws_opsworks_custom_layer_test.go +++ b/aws/resource_aws_opsworks_custom_layer_test.go @@ -22,7 +22,7 @@ func TestAccAWSOpsworksCustomLayer_basic(t *testing.T) { resourceName := "aws_opsworks_custom_layer.tf-acc" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, Steps: []resource.TestStep{ @@ -64,7 +64,7 @@ func TestAccAWSOpsworksCustomLayer_tags(t *testing.T) { resourceName := "aws_opsworks_custom_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, Steps: []resource.TestStep{ @@ -108,7 +108,7 @@ func TestAccAWSOpsworksCustomLayer_noVPC(t *testing.T) { resourceName := "aws_opsworks_custom_layer.tf-acc" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_ganglia_layer_test.go b/aws/resource_aws_opsworks_ganglia_layer_test.go index 85a02e00a340..17c7eee1b894 100644 --- a/aws/resource_aws_opsworks_ganglia_layer_test.go +++ b/aws/resource_aws_opsworks_ganglia_layer_test.go @@ -15,7 +15,7 @@ func TestAccAWSOpsworksGangliaLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_ganglia_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksGangliaLayerDestroy, Steps: []resource.TestStep{ @@ -35,7 +35,7 @@ func TestAccAWSOpsworksGangliaLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_ganglia_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksGangliaLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_haproxy_layer_test.go b/aws/resource_aws_opsworks_haproxy_layer_test.go index 44aa70e0f1c0..60d915e83562 100644 --- a/aws/resource_aws_opsworks_haproxy_layer_test.go +++ b/aws/resource_aws_opsworks_haproxy_layer_test.go @@ -15,7 +15,7 @@ func TestAccAWSOpsworksHAProxyLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_haproxy_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksHAProxyLayerDestroy, Steps: []resource.TestStep{ @@ -35,7 +35,7 @@ func TestAccAWSOpsworksHAProxyLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_haproxy_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksHAProxyLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_instance_test.go b/aws/resource_aws_opsworks_instance_test.go index 01d82680ea99..2e9a7df4a166 100644 --- a/aws/resource_aws_opsworks_instance_test.go +++ b/aws/resource_aws_opsworks_instance_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksInstance_basic(t *testing.T) { resourceName := "aws_opsworks_instance.tf-acc" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksInstanceDestroy, Steps: []resource.TestStep{ @@ -67,7 +67,7 @@ func TestAccAWSOpsworksInstance_UpdateHostNameForceNew(t *testing.T) { var before, after opsworks.Instance resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksInstanceDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_java_app_layer_test.go b/aws/resource_aws_opsworks_java_app_layer_test.go index c997d19b0f21..f5f321759011 100644 --- a/aws/resource_aws_opsworks_java_app_layer_test.go +++ b/aws/resource_aws_opsworks_java_app_layer_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksJavaAppLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_java_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksJavaAppLayerDestroy, Steps: []resource.TestStep{ @@ -37,7 +37,7 @@ func TestAccAWSOpsworksJavaAppLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_java_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksJavaAppLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_memcached_layer_test.go b/aws/resource_aws_opsworks_memcached_layer_test.go index ec112f04932e..560b52e3d0cc 100644 --- a/aws/resource_aws_opsworks_memcached_layer_test.go +++ b/aws/resource_aws_opsworks_memcached_layer_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksMemcachedLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_memcached_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksMemcachedLayerDestroy, Steps: []resource.TestStep{ @@ -37,7 +37,7 @@ func TestAccAWSOpsworksMemcachedLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_memcached_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksMemcachedLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_mysql_layer_test.go b/aws/resource_aws_opsworks_mysql_layer_test.go index f3aa817be45b..ab5a62f53488 100644 --- a/aws/resource_aws_opsworks_mysql_layer_test.go +++ b/aws/resource_aws_opsworks_mysql_layer_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksMysqlLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_mysql_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksMysqlLayerDestroy, Steps: []resource.TestStep{ @@ -37,7 +37,7 @@ func TestAccAWSOpsworksMysqlLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_mysql_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksMysqlLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_nodejs_app_layer_test.go b/aws/resource_aws_opsworks_nodejs_app_layer_test.go index 057705152968..2be3bbf9c8df 100644 --- a/aws/resource_aws_opsworks_nodejs_app_layer_test.go +++ b/aws/resource_aws_opsworks_nodejs_app_layer_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksNodejsAppLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_nodejs_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksNodejsAppLayerDestroy, Steps: []resource.TestStep{ @@ -37,7 +37,7 @@ func TestAccAWSOpsworksNodejsAppLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_nodejs_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksNodejsAppLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_permission_test.go b/aws/resource_aws_opsworks_permission_test.go index a62eedcb4be8..f4cef3e03381 100644 --- a/aws/resource_aws_opsworks_permission_test.go +++ b/aws/resource_aws_opsworks_permission_test.go @@ -16,7 +16,7 @@ func TestAccAWSOpsworksPermission_basic(t *testing.T) { sName := fmt.Sprintf("tf-ops-perm-%d", acctest.RandInt()) var opsperm opsworks.Permission resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksPermissionDestroy, Steps: []resource.TestStep{ @@ -99,7 +99,7 @@ func TestAccAWSOpsworksPermission_Self(t *testing.T) { resourceName := "aws_opsworks_permission.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: nil, // Cannot delete own OpsWorks Permission Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_php_app_layer_test.go b/aws/resource_aws_opsworks_php_app_layer_test.go index 4d09aea70015..f7975bd96d45 100644 --- a/aws/resource_aws_opsworks_php_app_layer_test.go +++ b/aws/resource_aws_opsworks_php_app_layer_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksPhpAppLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_php_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksPhpAppLayerDestroy, Steps: []resource.TestStep{ @@ -42,7 +42,7 @@ func TestAccAWSOpsworksPhpAppLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_php_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksPhpAppLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_rails_app_layer_test.go b/aws/resource_aws_opsworks_rails_app_layer_test.go index 5fb659d442f0..ebf82b739e51 100644 --- a/aws/resource_aws_opsworks_rails_app_layer_test.go +++ b/aws/resource_aws_opsworks_rails_app_layer_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksRailsAppLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_rails_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksRailsAppLayerDestroy, Steps: []resource.TestStep{ @@ -47,7 +47,7 @@ func TestAccAWSOpsworksRailsAppLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_rails_app_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksRailsAppLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_rds_db_instance_test.go b/aws/resource_aws_opsworks_rds_db_instance_test.go index 24cdeaa68f75..6acba7d4d397 100644 --- a/aws/resource_aws_opsworks_rds_db_instance_test.go +++ b/aws/resource_aws_opsworks_rds_db_instance_test.go @@ -16,7 +16,7 @@ func TestAccAWSOpsworksRdsDbInstance_basic(t *testing.T) { sName := fmt.Sprintf("test-db-instance-%d", acctest.RandInt()) var opsdb opsworks.RdsDbInstance resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksRdsDbDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_stack_test.go b/aws/resource_aws_opsworks_stack_test.go index 6dfb3d814b2d..45de7f2dab05 100644 --- a/aws/resource_aws_opsworks_stack_test.go +++ b/aws/resource_aws_opsworks_stack_test.go @@ -23,7 +23,11 @@ func TestAccAWSOpsworksStack_noVpcBasic(t *testing.T) { var opsstack opsworks.Stack resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSOpsWorksStacks(t) }, + PreCheck: func() { + testAccPreCheck(t) + testAccPartitionHasServicePreCheck("opsworks", t) + testAccPreCheckAWSOpsWorksStacks(t) + }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, Steps: []resource.TestStep{ @@ -49,7 +53,11 @@ func TestAccAWSOpsworksStack_noVpcChangeServiceRoleForceNew(t *testing.T) { var before, after opsworks.Stack resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSOpsWorksStacks(t) }, + PreCheck: func() { + testAccPreCheck(t) + testAccPartitionHasServicePreCheck("opsworks", t) + testAccPreCheckAWSOpsWorksStacks(t) + }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, Steps: []resource.TestStep{ @@ -81,7 +89,11 @@ func TestAccAWSOpsworksStack_vpc(t *testing.T) { var opsstack opsworks.Stack resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSOpsWorksStacks(t) }, + PreCheck: func() { + testAccPreCheck(t) + testAccPartitionHasServicePreCheck("opsworks", t) + testAccPreCheckAWSOpsWorksStacks(t) + }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, Steps: []resource.TestStep{ @@ -125,7 +137,11 @@ func TestAccAWSOpsworksStack_noVpcCreateTags(t *testing.T) { var opsstack opsworks.Stack resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSOpsWorksStacks(t) }, + PreCheck: func() { + testAccPreCheck(t) + testAccPartitionHasServicePreCheck("opsworks", t) + testAccPreCheckAWSOpsWorksStacks(t) + }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, Steps: []resource.TestStep{ @@ -164,7 +180,11 @@ func TestAccAWSOpsworksStack_CustomCookbooks_SetPrivateProperties(t *testing.T) var opsstack opsworks.Stack resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSOpsWorksStacks(t) }, + PreCheck: func() { + testAccPreCheck(t) + testAccPartitionHasServicePreCheck("opsworks", t) + testAccPreCheckAWSOpsWorksStacks(t) + }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStackDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_static_web_layer_test.go b/aws/resource_aws_opsworks_static_web_layer_test.go index ed100eda6eb9..1e42b0a8bd43 100644 --- a/aws/resource_aws_opsworks_static_web_layer_test.go +++ b/aws/resource_aws_opsworks_static_web_layer_test.go @@ -18,7 +18,7 @@ func TestAccAWSOpsworksStaticWebLayer_basic(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_static_web_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStaticWebLayerDestroy, Steps: []resource.TestStep{ @@ -42,7 +42,7 @@ func TestAccAWSOpsworksStaticWebLayer_tags(t *testing.T) { stackName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_opsworks_static_web_layer.test" resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksStaticWebLayerDestroy, Steps: []resource.TestStep{ diff --git a/aws/resource_aws_opsworks_user_profile_test.go b/aws/resource_aws_opsworks_user_profile_test.go index 636458c5e90a..8e3e2b8fec06 100644 --- a/aws/resource_aws_opsworks_user_profile_test.go +++ b/aws/resource_aws_opsworks_user_profile_test.go @@ -16,7 +16,7 @@ func TestAccAWSOpsworksUserProfile_basic(t *testing.T) { rName := fmt.Sprintf("test-user-%d", acctest.RandInt()) updateRName := fmt.Sprintf("test-user-%d", acctest.RandInt()) resource.ParallelTest(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, + PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck("opsworks", t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAwsOpsworksUserProfileDestroy, Steps: []resource.TestStep{