Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests/resource/aws_securityhub_member: Handle BadRequestException in …
…CheckDestroy (#16408) Reference: https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_ListMembers.html Previously the test would pass but the CheckDestroy would fail: ``` === RUN TestAccAWSSecurityHub_serial/Member/invite TestAccAWSSecurityHub_serial/Member/invite: testing_new.go:63: Error running post-test destroy, there may be dangling resources: BadRequestException: status code: 400, request id: 34dfc5cd-16bb-4e31-9924-6b060f6f30b7 === RUN TestAccAWSSecurityHub_serial/Member/basic TestAccAWSSecurityHub_serial/Member/basic: testing_new.go:63: Error running post-test destroy, there may be dangling resources: BadRequestException: status code: 400, request id: 5049c5b7-be35-4fd2-93d3-4b58e13c7140 ``` This error code is not listed in the API Reference, but the same exact call is used in the CheckExists function, so seems related to only when SecurityHub has been disabled after the test has been completed. Output from acceptance testing: ``` --- PASS: TestAccAWSSecurityHub_serial (28.16s) --- PASS: TestAccAWSSecurityHub_serial/Member (28.16s) --- PASS: TestAccAWSSecurityHub_serial/Member/invite (14.81s) --- PASS: TestAccAWSSecurityHub_serial/Member/basic (13.35s) ```
- Loading branch information