tests/service/guardduty: Add PreCheck or ErrorCheck for Existing Detector #18619
Labels
service/guardduty
Issues and PRs that pertain to the guardduty service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
tests
PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone
Community Note
Description
GuardDuty only allows one Detector per account and certain testing accounts may already have that Detector (e.g. managed by security teams). Currently the acceptance testing will fail with errors like the below in that situation:
Instead, the acceptance testing should mark these tests as skipped. Preferably, this can be done with a
PreCheck
function that usesListDetectors
to see if there is already an existing Detector identifier rather than fail during the apply of the test configuration. Otherwise, it can be done with registering anErrorCheck
for the service.Affected Resources
The text was updated successfully, but these errors were encountered: