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

tests/opsworks: Add ErrorCheck (Part 1) #18195

Merged
merged 8 commits into from
Mar 18, 2021
1 change: 1 addition & 0 deletions aws/resource_aws_opsworks_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestAccAWSOpsworksApplication_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksApplicationDestroy,
Steps: []resource.TestStep{
Expand Down
3 changes: 3 additions & 0 deletions aws/resource_aws_opsworks_custom_layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func TestAccAWSOpsworksCustomLayer_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -64,6 +65,7 @@ func TestAccAWSOpsworksCustomLayer_tags(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -108,6 +110,7 @@ func TestAccAWSOpsworksCustomLayer_noVPC(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksCustomLayerDestroy,
Steps: []resource.TestStep{
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_opsworks_ganglia_layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestAccAWSOpsworksGangliaLayer_basic(t *testing.T) {
resourceName := "aws_opsworks_ganglia_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksGangliaLayerDestroy,
Steps: []resource.TestStep{
Expand All @@ -36,6 +37,7 @@ func TestAccAWSOpsworksGangliaLayer_tags(t *testing.T) {
resourceName := "aws_opsworks_ganglia_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksGangliaLayerDestroy,
Steps: []resource.TestStep{
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_opsworks_haproxy_layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ func TestAccAWSOpsworksHAProxyLayer_basic(t *testing.T) {
resourceName := "aws_opsworks_haproxy_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksHAProxyLayerDestroy,
Steps: []resource.TestStep{
Expand All @@ -36,6 +37,7 @@ func TestAccAWSOpsworksHAProxyLayer_tags(t *testing.T) {
resourceName := "aws_opsworks_haproxy_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksHAProxyLayerDestroy,
Steps: []resource.TestStep{
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_opsworks_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func TestAccAWSOpsworksInstance_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksInstanceDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -69,6 +70,7 @@ func TestAccAWSOpsworksInstance_UpdateHostNameForceNew(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksInstanceDestroy,
Steps: []resource.TestStep{
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_opsworks_java_app_layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func TestAccAWSOpsworksJavaAppLayer_basic(t *testing.T) {
resourceName := "aws_opsworks_java_app_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksJavaAppLayerDestroy,
Steps: []resource.TestStep{
Expand All @@ -38,6 +39,7 @@ func TestAccAWSOpsworksJavaAppLayer_tags(t *testing.T) {
resourceName := "aws_opsworks_java_app_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksJavaAppLayerDestroy,
Steps: []resource.TestStep{
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_opsworks_memcached_layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func TestAccAWSOpsworksMemcachedLayer_basic(t *testing.T) {
resourceName := "aws_opsworks_memcached_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksMemcachedLayerDestroy,
Steps: []resource.TestStep{
Expand All @@ -38,6 +39,7 @@ func TestAccAWSOpsworksMemcachedLayer_tags(t *testing.T) {
resourceName := "aws_opsworks_memcached_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksMemcachedLayerDestroy,
Steps: []resource.TestStep{
Expand Down
2 changes: 2 additions & 0 deletions aws/resource_aws_opsworks_mysql_layer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func TestAccAWSOpsworksMysqlLayer_basic(t *testing.T) {
resourceName := "aws_opsworks_mysql_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksMysqlLayerDestroy,
Steps: []resource.TestStep{
Expand All @@ -38,6 +39,7 @@ func TestAccAWSOpsworksMysqlLayer_tags(t *testing.T) {
resourceName := "aws_opsworks_mysql_layer.test"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(opsworks.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, opsworks.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsOpsworksMysqlLayerDestroy,
Steps: []resource.TestStep{
Expand Down