feat: Policy Snapshot Testing#449
Merged
bbernays merged 125 commits intocloudquery:mainfrom Feb 21, 2022
bbernays:Test-Runner
Merged
feat: Policy Snapshot Testing#449bbernays merged 125 commits intocloudquery:mainfrom bbernays:Test-Runner
bbernays merged 125 commits intocloudquery:mainfrom
bbernays:Test-Runner
Conversation
…bernays/cloudquery into Remove-filtering-from-executor
roneli
previously requested changes
Feb 13, 2022
Contributor
roneli
left a comment
There was a problem hiding this comment.
Added some comments around design, the whole PR is good, I think we can move some bits here and there, had a few suggestions.
All comments addressed (either implemented or deferred)
TinLe
pushed a commit
to TinLe/cloudquery
that referenced
this pull request
Feb 22, 2022
* upstream/main: feat: Policy Snapshot Testing (cloudquery#449) fix: Remove enable_partial_fetch and support for migrationless providers (cloudquery#495) fix: Upgrade schema in history mode (cloudquery#494) fix: Don't report unmanaged provider diags to sentry (cloudquery#492) feat: Modules v2 support (cloudquery#489) chore: Synced local '.github/dependabot.yml' with remote 'dependabot.yml' (cloudquery#490) chore: Remove '--debug' flag from issue template (cloudquery#488) fix: Don't return an error if encountering an empty subpolicy (cloudquery#486) fix: Fetch summary SQL state 54000 (cloudquery#487)
This was referenced May 10, 2022
erezrokah
pushed a commit
that referenced
this pull request
Aug 14, 2022
Co-authored-by: cq-bot <null>
erezrokah
pushed a commit
that referenced
this pull request
Aug 14, 2022
Synced local file(s) with [cloudquery/.github](https://github.com/cloudquery/.github). --- This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#2774614062](https://github.com/cloudquery/.github/actions/runs/2774614062)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Overview:
adds new command:
cloudquery snapshot <selector> <output-directory>example:
cloudquery snapshot aws//foundational_security/ec2/EC2.18 database-dataadds new command running policy tests:
Example invocation:
go run main.go policy test .cq/policies/github.com/cloudquery-policies/aws ./destOutput:
<output-directory>/query-<CONTROL-ID>/tests/<UUID>-
pg-dump.sqlstores all relevant tables and views including data-
data.jsonthis stores the output of control against the dumped dataKnown issues:
pg_dump- exports views as tables... This adds complications for migrations in the future as any tooling we might have will operate at the table level rather than the newly derived table from the view- When SQL queries returns no data output is\N(postgres syntax fornull)To Do:
This pr is blocked by this pr: https://github.com/cloudquery/cloudquery/pull/449/files