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/servicediscovery: Add ErrorCheck #18298

Merged
merged 4 commits into from
Mar 19, 2021
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
4 changes: 4 additions & 0 deletions aws/resource_aws_service_discovery_http_namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func TestAccAWSServiceDiscoveryHttpNamespace_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryHttpNamespaceDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -128,6 +129,7 @@ func TestAccAWSServiceDiscoveryHttpNamespace_disappears(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryHttpNamespaceDestroy,
Steps: []resource.TestStep{
Expand All @@ -149,6 +151,7 @@ func TestAccAWSServiceDiscoveryHttpNamespace_Description(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryHttpNamespaceDestroy,
Steps: []resource.TestStep{
Expand All @@ -174,6 +177,7 @@ func TestAccAWSServiceDiscoveryHttpNamespace_Tags(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryHttpNamespaceDestroy,
Steps: []resource.TestStep{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPrivateDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -128,6 +129,7 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_disappears(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPrivateDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand All @@ -149,6 +151,7 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_Description(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPrivateDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand All @@ -171,6 +174,7 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_error_Overlap(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPrivateDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand All @@ -188,6 +192,7 @@ func TestAccAWSServiceDiscoveryPrivateDnsNamespace_Tags(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPrivateDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func TestAccAWSServiceDiscoveryPublicDnsNamespace_basic(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPublicDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -127,6 +128,7 @@ func TestAccAWSServiceDiscoveryPublicDnsNamespace_disappears(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPublicDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand All @@ -148,6 +150,7 @@ func TestAccAWSServiceDiscoveryPublicDnsNamespace_Description(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPublicDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand All @@ -168,6 +171,7 @@ func TestAccAWSServiceDiscoveryPublicDnsNamespace_Tags(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPreCheckAWSServiceDiscovery(t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryPublicDnsNamespaceDestroy,
Steps: []resource.TestStep{
Expand Down
5 changes: 5 additions & 0 deletions aws/resource_aws_service_discovery_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func TestAccAWSServiceDiscoveryService_private(t *testing.T) {
testAccPartitionHasServicePreCheck(servicediscovery.EndpointsID, t)
testAccPreCheckAWSServiceDiscovery(t)
},
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -173,6 +174,7 @@ func TestAccAWSServiceDiscoveryService_public(t *testing.T) {
testAccPartitionHasServicePreCheck(servicediscovery.EndpointsID, t)
testAccPreCheckAWSServiceDiscovery(t)
},
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -226,6 +228,7 @@ func TestAccAWSServiceDiscoveryService_http(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(servicediscovery.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy,
Steps: []resource.TestStep{
Expand Down Expand Up @@ -253,6 +256,7 @@ func TestAccAWSServiceDiscoveryService_disappears(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(servicediscovery.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy,
Steps: []resource.TestStep{
Expand All @@ -274,6 +278,7 @@ func TestAccAWSServiceDiscoveryService_Tags(t *testing.T) {

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t); testAccPartitionHasServicePreCheck(servicediscovery.EndpointsID, t) },
ErrorCheck: testAccErrorCheck(t, servicediscovery.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAwsServiceDiscoveryServiceDestroy,
Steps: []resource.TestStep{
Expand Down