StyraInc / opa-aws-cloudformation-hook

AWS Cloudformation Hook for OPA-powered infrastructure policy enforcement
Apache License 2.0
35 stars 5 forks source link

Test fixups #7

Closed anderseknert closed 2 years ago

anderseknert commented 2 years ago

Some fixes to run the tests. The one problem remaining is the tests in the s3-bucket-logging-enabled directory, as these seem to be copy-pasted from the bucket-encryption dir.

Signed-off-by: Anders Eknert anders@eknert.com

anderseknert commented 2 years ago

@peteroneilljr do you have tests for the s3-bucket-logging-enabled policy locally? If so, please add them in a separate PR 👍

I've been running these tests like this:

find templates -type d -name 'opa' -exec opa test {} \;

As that will run the tests in each opa directory independently. If we used individual package names, we could just run all tests in a single invocation, like:

opa test templates/ --ignore "*.yaml"

I don't have a strong preference though.

anderseknert commented 2 years ago

Sounds good! Yeah, feel free to rework this as you wish, I just wanted to fix the failing tests I encountered :)