Skip to content

How would you test against policies which are stored in a database? #1589

Answered by charithe
bbodensieck asked this question in Q&A
Discussion options

You must be logged in to vote

The Cerbos testing framework is designed with the GitOps workflow in mind. The expectation is that any policy changes would go through a review process before being promoted to production. During that process the tests can be automatically run by the CI system to catch any problems.

If you are using a database to store the policies because they need to modified on the fly, then does it make much sense to test them because you'd be doing that after they have already gone live?

If you still want to go ahead with testing the policies you have in the database, you could use the cerbosctl get command to pull down the currently active policies and write them to disk. Then you can copy over your…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bbodensieck
Comment options

Answer selected by bbodensieck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants