Closed chrsmith closed 4 years ago
@chrsmith, I'll push a commit to this PR that updates it to the latest API
@justinvp , @ekrengel PTAL. I rebased with the latest bits from master.
The breaking API changes were good, since as it turns out some of these needed to be of ty pe StackValidationPolicy
. This means I had to create some new test helper methods, and do some refactoring.
So now /tests/util.ts
exports:
assertHasStackViolation
and assertHasResourceViolation
. Both of which calls the unexpected assertHasViolation
under the hood.
Adds the security rules from #2, but cleaned up to use the current SDK and testing idioms. I added unit tests for all of the rules, but no integration tests.
Note that the tests use a library for mocking out the AWS SDK calls made during the rule's execution. It makes the tests a little verbose, but it seems to work pretty well.