Skip to content

Commit

Permalink
r/aws_ses_domain_identity_verification: compare enum types
Browse files Browse the repository at this point in the history
```console
% make testacc PKG=ses TESTS=TestAccSESDomainIdentityVerification_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.5 test ./internal/service/ses/... -v -count 1 -parallel 20 -run='TestAccSESDomainIdentityVerification_'  -timeout 360m
=== RUN   TestAccSESDomainIdentityVerification_basic
    domain_identity_verification_test.go:27: Environment variable SES_DOMAIN_IDENTITY_ROOT_DOMAIN is not set. For DNS verification requests, this domain must be publicly accessible and configurable via Route53 during the testing.
--- SKIP: TestAccSESDomainIdentityVerification_basic (0.00s)
=== RUN   TestAccSESDomainIdentityVerification_timeout
=== PAUSE TestAccSESDomainIdentityVerification_timeout
=== RUN   TestAccSESDomainIdentityVerification_nonexistent
=== PAUSE TestAccSESDomainIdentityVerification_nonexistent
=== CONT  TestAccSESDomainIdentityVerification_timeout
=== CONT  TestAccSESDomainIdentityVerification_nonexistent
--- PASS: TestAccSESDomainIdentityVerification_nonexistent (4.52s)
--- PASS: TestAccSESDomainIdentityVerification_timeout (11.75s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ses        16.412s
```
  • Loading branch information
jar-b committed Aug 6, 2024
1 parent ede7101 commit 49a17ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/ses/domain_identity_verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func resourceDomainIdentityVerificationCreate(ctx context.Context, d *schema.Res
return retry.NonRetryableError(fmt.Errorf("SES Domain Identity %s not found in AWS", domainName))
}

if string(att.VerificationStatus) != string(awstypes.VerificationStatusSuccess) {
if att.VerificationStatus != awstypes.VerificationStatusSuccess {
return retry.RetryableError(fmt.Errorf("Expected domain verification Success, but was in state %s", string(att.VerificationStatus)))
}

Expand All @@ -92,7 +92,7 @@ func resourceDomainIdentityVerificationCreate(ctx context.Context, d *schema.Res
var att *awstypes.IdentityVerificationAttributes
att, err = getIdentityVerificationAttributes(ctx, conn, domainName)

if att != nil && string(att.VerificationStatus) != string(awstypes.VerificationStatusSuccess) {
if att != nil && att.VerificationStatus != awstypes.VerificationStatusSuccess {
return sdkdiag.AppendErrorf(diags, "Expected domain verification Success, but was in state %s", string(att.VerificationStatus))
}
}
Expand Down Expand Up @@ -123,7 +123,7 @@ func resourceDomainIdentityVerificationRead(ctx context.Context, d *schema.Resou
return diags
}

if string(att.VerificationStatus) != string(awstypes.VerificationStatusSuccess) {
if att.VerificationStatus != awstypes.VerificationStatusSuccess {
log.Printf("[WARN] Expected domain verification Success, but was %s, tainting verification", string(att.VerificationStatus))
d.SetId("")
return diags
Expand Down

0 comments on commit 49a17ab

Please sign in to comment.