-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Hello,
I tried to test conftest with remote policies using --update
flag. However, it seems update cannot be called multiple times because it conflicts with previously downloaded tests.
First run works:
conftest test --update https://raw.githubusercontent.com/kirecek/policy-test/refs/heads/main/policy/main.rego main.tf
3 tests, 3 passed, 0 warnings, 0 failures, 0 exceptions
Second run fails as policy is already there.
conftest test --update https://raw.githubusercontent.com/kirecek/policy-test/refs/heads/main/policy/main.rego main.tf
Error: running test: update policies: policy file already exists at policy/policy-test, refusing to overwrite
Which is set by downloader code:
conftest/downloader/downloader.go
Line 47 in 609490f
return fmt.Errorf("policy file already exists at %s, refusing to overwrite", targetPath) |
I'm wondering if it would make sense to keep those policies in separate (tmp) directory or introduce some flag to clean downloaded policies?
Thanks!
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers