Added dry-run parameter on policy methods #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Desired Outcome
There is no way on checking a policy file with the dryRun option using the Python API.
Feature described here:
https://docs.cyberark.com/conjur-enterprise/latest/en/content/operations/policy/policy-verify.html#APIvalidateparameter
This PR adds the functionality with backwards compatibility. So that we can call any policy method with an extra dry_run parameter in order to have the policy only checked
Implemented Changes
Test coverage
No additional tests are added, as this seems trivial. Plus I don't want to put in that much effort as this repository seems to be in limbo? I'll be happy to create one if there a real demand for it, and when it is actually going to be merged, but right now I just want to contribute some inspiration for others.
Also we're not really blocked by it, as we use this exact logic in extended classes of Client and API