As a convention, the tests are in the test directory, so they're not packaged during build time. We'd like to leverage this mechanism.
The idea is to find rego files to test and then search for their test counterparts in the test directory. Then, the tests would be run like this:
opa test src/main/resources/opa/policies/policies.rego src/test/resources/opa/policies/policies-test.rego
As a convention, the tests are in the
testdirectory, so they're not packaged during build time. We'd like to leverage this mechanism.The idea is to find
regofiles to test and then search for their test counterparts in thetestdirectory. Then, the tests would be run like this:opa test src/main/resources/opa/policies/policies.rego src/test/resources/opa/policies/policies-test.rego