open-policy-agent/conftest 1335
Write tests against structured configuration data using the Open Policy Agent Rego query language
A declaritive test framework for Terraform
cloudfoundry-incubator/credhub-cli 34
CredHub CLI provides a command line interface to interact with CredHub servers
because (en)ough with the y(aml) already
a cf cli plugin to perf/load test an app ( based on vegeta cli )
a service broker, once bound unleashes chaos on your apps
a boilerplate service broker in golang
cf plugin for hands-off, zero downtime application deploys
xchapter7x/bosh-init-concourse 0
Deploy a Concourse.ci using the new bosh-init CLI
push eventxchapter7x/clarity
commit sha 5e1a6d13a89b59dcc622c8e25676df7376aac65a
Bump github.com/cucumber/godog from 0.9.0 to 0.10.0 (#9) Bumps [github.com/cucumber/godog](https://github.com/cucumber/godog) from 0.9.0 to 0.10.0. - [Release notes](https://github.com/cucumber/godog/releases) - [Changelog](https://github.com/cucumber/godog/blob/master/CHANGELOG.md) - [Commits](https://github.com/cucumber/godog/compare/v0.9.0...v0.10.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
push time in an hour
PR merged xchapter7x/clarity
Bumps github.com/cucumber/godog from 0.9.0 to 0.10.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/cucumber/godog/releases">github.com/cucumber/godog's releases</a>.</em></p> <blockquote> <h2>v0.10.0</h2> <p>This release includes a lot of smaller bugfixes, but most notably, we now have concurrency support for all our formatters and we now also support concurrency across scenarios.</p> <p>More information can be found in the <a href="https://github.com/cucumber/godog/blob/master/CHANGELOG.md#v0100">Changelog</a> and <a href="https://github.com/cucumber/godog/blob/master/release-notes/v0.10.0.md">Release Notes</a>.</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/cucumber/godog/blob/master/CHANGELOG.md">github.com/cucumber/godog's changelog</a>.</em></p> <blockquote> <h2>[v0.10.0]</h2> <h3>Added</h3> <ul> <li>Added concurrency support to the pretty formatter (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/275">275</a> - [lonnblad])</li> <li>Added concurrency support to the events formatter (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/274">274</a> - [lonnblad])</li> <li>Added concurrency support to the cucumber formatter (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/273">273</a> - [lonnblad])</li> <li>Added an example for how to use assertion pkgs like testify with godog (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/289">289</a> - [lonnblad])</li> <li>Added the new TestSuiteInitializer and ScenarioInitializer (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/294">294</a> - [lonnblad])</li> <li>Added an in-mem storage for pickles (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/304">304</a> - [lonnblad])</li> <li>Added Pickle and PickleStep results to the in-mem storage (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/305">305</a> - [lonnblad])</li> <li>Added features to the in-mem storage (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/306">306</a> - [lonnblad])</li> <li>Broke out some code from massive files into new files (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/307">307</a> - [lonnblad])</li> <li>Added support for concurrent scenarios (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/311">311</a> - [lonnblad])</li> </ul> <h3>Changed</h3> <ul> <li>Broke out snippets gen and added sorting on method name (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/271">271</a> - [lonnblad])</li> <li>Updated so that we run all tests concurrent now (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/278">278</a> - [lonnblad])</li> <li>Moved fmt tests to a godog_test pkg and restructured the fmt output tests (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/295">295</a> - [lonnblad])</li> <li>Moved builder tests to a godog_test pkg (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/296">296</a> - [lonnblad])</li> <li>Made the builder tests run in parallel (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/298">298</a> - [lonnblad])</li> <li>Refactored suite_context.go (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/300">300</a> - [lonnblad])</li> <li>Added better testing of the Context Initializers and TestSuite{}.Run() (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/301">301</a> - [lonnblad])</li> <li>Updated the README.md (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/302">302</a> - [lonnblad])</li> <li>Unexported some exported properties in unexported structs (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/303">303</a> - [lonnblad])</li> <li>Refactored some states in the formatters and feature struct (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/310">310</a> - [lonnblad])</li> </ul> <h3>Deprecated</h3> <ul> <li>Deprecated SuiteContext and ConcurrentFormatter (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/314">314</a> - [lonnblad])</li> </ul> <h3>Removed</h3> <ul> <li>Removed pre go112 build code (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/293">293</a> - [lonnblad])</li> <li>Removed the deprecated feature hooks (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/312">312</a> - [lonnblad])</li> </ul> <h3>Fixed</h3> <ul> <li>Fixed failing builder tests due to the v0.9.0 change ([lonnblad])</li> <li>Update paths to screenshots for examples (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/270">270</a> - [leviable])</li> <li>Made progress formatter verification a bit more accurate ([lonnblad])</li> <li>Added comparison between single and multi threaded runs (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/272">272</a> - [lonnblad])</li> <li>Fixed issue with empty feature file causing nil pointer deref (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/288">288</a> - [lonnblad])</li> <li>Updated linting checks in circleci config and fixed linting issues (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/290">290</a> - [lonnblad])</li> <li>Readded some legacy doc for FeatureContext (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/297">297</a> - [lonnblad])</li> <li>Fixed an issue with calculating time for junit testsuite (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/308">308</a> - [lonnblad])</li> <li>Fixed so that we don't execute features with zero scenarios (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/315">315</a> - [lonnblad])</li> <li>Fixed the broken --random flag (<a href="https://github-redirect.dependabot.com/cucumber/godog/pull/317">317</a> - [lonnblad])</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/cucumber/godog/commit/51a387469c5111eb05a3869751f0e04043dc56ae"><code>51a3874</code></a> v0.10.0 release</li> <li><a href="https://github.com/cucumber/godog/commit/cff1e2f1974afd83dfe4d44a82b93a69b39f4408"><code>cff1e2f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cucumber/godog/issues/313">#313</a> from cucumber/v0.10.0-rc1</li> <li><a href="https://github.com/cucumber/godog/commit/fc084134a0b14292c4446e6b97679e2976a36712"><code>fc08413</code></a> Wrote Release Notes, updated CHANGELOG.md and versions in README.md and godog...</li> <li><a href="https://github.com/cucumber/godog/commit/2cc5a5548aa659ffb7d7782d3587c5f153efdc8b"><code>2cc5a55</code></a> Update CHANGELOG.md</li> <li><a href="https://github.com/cucumber/godog/commit/b7dd08770fd433efbeaf3c9e1293c8e6c301a294"><code>b7dd087</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cucumber/godog/issues/315">#315</a> from cucumber/remove-features-with-no-scenarios</li> <li><a href="https://github.com/cucumber/godog/commit/7df9dadeb937ac438b218cce8ea26465f62a037a"><code>7df9dad</code></a> Fixed so that we don't execute features with zero scenarios</li> <li><a href="https://github.com/cucumber/godog/commit/1033ce083bed7effae2a397f1afbda5e828f03d5"><code>1033ce0</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cucumber/godog/issues/317">#317</a> from cucumber/fixed-the-random-flag-bug</li> <li><a href="https://github.com/cucumber/godog/commit/376280cfc609d5146c8b6b3ee83959e7b304cd11"><code>376280c</code></a> Fixed the broken --random flag</li> <li><a href="https://github.com/cucumber/godog/commit/97955880126f7912774b8de48a451fe72cdf3bf6"><code>9795588</code></a> Updated CHANGELOG.md</li> <li><a href="https://github.com/cucumber/godog/commit/46c8dbcbcb08ab6322b7ef28c4bd0ba1a35e016c"><code>46c8dbc</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/cucumber/godog/issues/314">#314</a> from cucumber/deprecations</li> <li>Additional commits viewable in <a href="https://github.com/cucumber/godog/compare/v0.9.0...v0.10.0">compare view</a></li> </ul> </details> <br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.
You can always request more updates by clicking Bump now in your Dependabot dashboard.
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language@dependabot badge mewill comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
pr closed time in an hour
delete branch xchapter7x/clarity
delete branch : dependabot/go_modules/github.com/onsi/gomega-1.10.2
delete time in an hour
push eventxchapter7x/clarity
commit sha 6178c28599808affc40e638be9aef77d94cfef8c
Bump github.com/onsi/gomega from 1.10.1 to 1.10.2 (#13) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.10.1 to 1.10.2. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.10.1...v1.10.2) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
push time in an hour
PR merged xchapter7x/clarity
Bumps github.com/onsi/gomega from 1.10.1 to 1.10.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/onsi/gomega/releases">github.com/onsi/gomega's releases</a>.</em></p> <blockquote> <h2>v1.10.3</h2> <h3>Fixes</h3> <ul> <li>Add ExpectWithOffset, EventuallyWithOffset and ConsistentlyWithOffset to WithT (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/391">#391</a>) [990941a]</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/onsi/gomega/blob/master/CHANGELOG.md">github.com/onsi/gomega's changelog</a>.</em></p> <blockquote> <h2>1.10.2</h2> <h3>Fixes</h3> <ul> <li>Add ExpectWithOffset, EventuallyWithOffset and ConsistentlyWithOffset to WithT (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/391">#391</a>) [990941a]</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/onsi/gomega/commit/d7eb503b14592ef8cefacd3c9589398c7decaf23"><code>d7eb503</code></a> v1.10.2</li> <li><a href="https://github.com/onsi/gomega/commit/990941a380b2eb1e8bf98d40c8549e43ae011940"><code>990941a</code></a> Add ExpectWithOffset, EventuallyWithOffset and ConsistentlyWithOffset to With...</li> <li>See full diff in <a href="https://github.com/onsi/gomega/compare/v1.10.1...v1.10.2">compare view</a></li> </ul> </details> <br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.
You can always request more updates by clicking Bump now in your Dependabot dashboard.
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language@dependabot badge mewill comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
pr closed time in an hour
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in 3 days
pull request commentopen-policy-agent/conftest
Fair point. With regard to which files need to move, The files in testdata, as part of this PR, are only the files used in the bats tests. A handful of which were also referenced in go tests, so there was some overlap there. However, that was minimal.
With your suggestion around using inline rego, do you envision replacing the bats stuff with a post compile acceptance suite in go?
Let me know how youd like to proceed here. Thanks :)
-John
On Mon, Sep 21, 2020, 12:31 AM John Reese [email protected] wrote:
I agree with the idea of splitting up examples from testdata, but I'm not sure which files actually need to be moved and which could be removed in favor of inline Rego in a Go test. I have a lot of other PRs that touch on tests, and don't necessarily want to cause conflicts when its unknown if the data needs to move.
I planned on going through and combing through the current test suite and making sure that everything is covered appropriately, but my hope is that testdata would be incredibly small, maybe not even needed.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/open-policy-agent/conftest/pull/401#issuecomment-695844584, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFIRUYFHC2OA57G4HSMV5DSGZ7D3ANCNFSM4RQ7X3MA .
comment created time in 3 days
pull request commentopen-policy-agent/conftest
@jpreese / @Blokje5 Mind taking a peek at this PR?
I copied over only the files in examples which are actually used in the bats and go tests.
I decided to use the go standard testdata directory for those, and left the examples as they are.
Perhaps in time there will be more package specific testdata fixtures, but for now i've kept them in a single spot.
The bats acceptance tests in particular make reference to network dependencies in the examples directory. this is for testing the pulling of remote policies from a repository. I've left that as it was. we can change that to something else (when something else exists) or leave it referencing an example file.
Happy to hear thoughts and feedback... thanks :)
comment created time in 6 days
push eventxchapter7x/conftest
commit sha 73cfc1c6586a7f9f480e135d3388a803ca42ca05
Render trace results once (#393) * Passing tests Signed-off-by: John Reese <[email protected]> * Remove table tracing Signed-off-by: John Reese <[email protected]>
commit sha 75f361fddaf333aa72b8fc90d2d3eba027cc4af3
use testdata for bats acceptance test bats acceptance tests now have their own independent testdata dir for all fixtures Signed-off-by: John Calabrese <[email protected]>
commit sha fe7c8411086c711835c5c1efa75ea808f4d1f428
use testdata for output go tests output package tests should use the testdata fixtures Signed-off-by: John Calabrese <[email protected]>
commit sha e88f23240988cb7a515dfd2c75310bbd3ba18fb0
use testdata for plugin package the plugin package should use the testdata fixture files Signed-off-by: John Calabrese <[email protected]>
commit sha 87867ca6924d471d6bf8c2041f35ad6e05216b9b
use testdata for policy package the policy package should use the testdata fixture files for tests Signed-off-by: John Calabrese <[email protected]>
commit sha fcb143e4e10203126d6685144d2dbc47c23d4803
resolve merge with master Signed-off-by: John Calabrese <[email protected]>
push time in 6 days
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in 6 days
push eventxchapter7x/conftest
commit sha 952da72774e8267a8ad84907a1e99172da9225e8
resolve merge with master Signed-off-by: John Calabrese <[email protected]>
push time in 6 days
push eventxchapter7x/conftest
commit sha eff014dfc15e5e2a8bf8c791abffa9a019621261
resolve merge with master
push time in 6 days
push eventxchapter7x/conftest
commit sha 1fdc9d0075c6b6210bacba06ad28654f65ea2609
Bump github.com/hashicorp/go-getter from 1.4.1 to 1.4.2 (#398) Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/hashicorp/go-getter/releases) - [Commits](https://github.com/hashicorp/go-getter/compare/v1.4.1...v1.4.2) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
commit sha 9ede5bf86308c228d92d6ca993dd84b2a75e9373
Bind pull flag (#395) Signed-off-by: John Reese <[email protected]>
commit sha 9711356c54cba9e592763b7e0e06303ae4ab19fa
Remove input-file from verify docs (#396) Signed-off-by: John Reese <[email protected]>
commit sha cc794a63878502dff336211cd46f6ef02580ae8b
Combine configurations into struct when using combine (#388) * Multidocument YAML Signed-off-by: John Reese <[email protected]> * Additional conflicts Signed-off-by: John Reese <[email protected]>
commit sha 019a093bc0e529dea39d80923f36982a3bcd6f94
Load policies and data individually (#394) Signed-off-by: John Reese <[email protected]>
commit sha b31085b36513f6b7092ed8ef91d5404f57c560ba
use testdata for bats acceptance test bats acceptance tests now have their own independent testdata dir for all fixtures Signed-off-by: John Calabrese <[email protected]>
commit sha 369a74423480a5018597a64a81a871eb4a29b82c
use testdata for output go tests output package tests should use the testdata fixtures Signed-off-by: John Calabrese <[email protected]>
commit sha a3f4a9df589895d689989c86ff6f9c5854838d2f
use testdata for plugin package the plugin package should use the testdata fixture files Signed-off-by: John Calabrese <[email protected]>
commit sha 4b12d5ae491aaa91b745d85f023146f6e8462087
use testdata for policy package the policy package should use the testdata fixture files for tests Signed-off-by: John Calabrese <[email protected]>
push time in 6 days
push eventxchapter7x/conftest
commit sha 64c51938c84edcfe7cc16a753bea6ccf20cbea3e
use testdata for bats acceptance test bats acceptance tests now have their own independent testdata dir for all fixtures Signed-off-by: John Calabrese <[email protected]>
commit sha 4a943eb47af02c698f1d6c5fa95ca9e104fb67fd
use testdata for output go tests output package tests should use the testdata fixtures Signed-off-by: John Calabrese <[email protected]>
commit sha 9e5a7eebba140ea76937c06d16e9613bfae37af5
use testdata for parser package tests the parser package should use the testdata fixture files Signed-off-by: John Calabrese <[email protected]>
commit sha b25886b7b2bd6c957eeb890470ef7575e36336d9
use testdata for plugin package the plugin package should use the testdata fixture files Signed-off-by: John Calabrese <[email protected]>
commit sha f6692ac75f7ecb9123aae159233444067682e502
use testdata for policy package the policy package should use the testdata fixture files for tests Signed-off-by: John Calabrese <[email protected]>
push time in 6 days
PR opened open-policy-agent/conftest
this is part 1 of this issue: https://github.com/open-policy-agent/conftest/issues/390
pr created time in 6 days
fork xchapter7x/conftest
Write tests against structured configuration data using the Open Policy Agent Rego query language
fork in 7 days
startedxchapter7x/clarity
started time in 7 days
issue commentxchapter7x/clarity
HCL check does not support terraform v0.12 syntax
In the meantime have you tried switching in your feature file gherkin
Given Terraform
replace with
Given HCL2
this will switch the parser to a .12 compatible version
comment created time in 7 days
issue commentxchapter7x/clarity
HCL check does not support terraform v0.12 syntax
Hi @fengyebxh
Thanks for reporting this issue. Let me try to reproduce this locally and see what i find. stay tuned :)
comment created time in 7 days
issue commentopen-policy-agent/conftest
Im looking to get back into conftest work. I'd be happy to take a crack at refactoring some of our tests.
Let me try to frame up the goals here:
- config files in examples should not be used as fixtures in any of our tests
- config files in examples should be tested for validity, such that they dont fall out of date
I think i'd break it out into 2 separate PRs for each of these goals.
goal 1:
given: a go test or a bats test
when: the test consumes a fixture config file
then: none of those fixture files are sourced from the same pool as the config examples set
goal 2:
given: a set of example config files and conftest test suite
when: the conftest test suite is run
then: we evaluate the validity of the config files in examples directory
and either fail or pass depending on the state of the files.
Questions:
goal 2:
We might need to define what is a valid example config and what is not. does valid mean, A) we can parse the config files and the rego files or B) we see an expected outcome with regards to the policy evaluation
Thoughts @Blokje5 @jpreese ???
comment created time in 7 days
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in 17 days
delete branch xchapter7x/clarity
delete branch : dependabot/go_modules/github.com/onsi/gomega-1.10.1
delete time in a month
push eventxchapter7x/clarity
commit sha 3eda2228b14694d2d97474cb69cbdea510b171ba
Bump github.com/onsi/gomega from 1.4.3 to 1.10.1 (#10) Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.4.3 to 1.10.1. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.4.3...v1.10.1) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
push time in a month
PR merged xchapter7x/clarity
Bumps github.com/onsi/gomega from 1.4.3 to 1.10.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/onsi/gomega/releases">github.com/onsi/gomega's releases</a>.</em></p> <blockquote> <h2>v1.10.1</h2> <h3>Fixes</h3> <ul> <li>Update dependencies (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/389">#389</a>) [9f5eecd]</li> </ul> <h2>v1.10.0</h2> <h3>Features</h3> <ul> <li>Add HaveHTTPStatusMatcher (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/378">#378</a>) [f335c94]</li> <li>Changed matcher for content-type in VerifyJSONRepresenting (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/377">#377</a>) [6024f5b]</li> <li>Make ghttp usable with x-unit style tests (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/376">#376</a>) [c0be499]</li> <li>Implement PanicWith matcher (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/381">#381</a>) [f8032b4]</li> </ul> <h2>v1.9.0</h2> <h3>Features</h3> <ul> <li>Add ContainElements matcher (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/370">#370</a>) [2f57380]</li> <li>Output missing and extra elements in ConsistOf failure message [a31eda7]</li> <li>Document method LargestMatching [7c5a280]</li> </ul> <h2>v1.8.1</h2> <h3>Fixes</h3> <ul> <li>Fix unexpected MatchError() behaviour (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/375">#375</a>) [8ae7b2f]</li> </ul> <h2>v1.8.0</h2> <h3>Features</h3> <ul> <li>Allow optional description to be lazily evaluated function (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/364">#364</a>) [bf64010]</li> <li>Support wrapped errors (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/359">#359</a>) [0a981cb]</li> </ul> <h2>v1.7.1</h2> <h3>Fixes</h3> <ul> <li>Bump go-yaml version to cover fixed ddos heuristic (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/362">#362</a>) [95e431e]</li> </ul> <h2>v1.7.0</h2> <h3>Features</h3> <ul> <li>export format property variables (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/347">#347</a>) [642e5ba]</li> </ul> <h3>Fixes</h3> <ul> <li>minor fix in the documentation of ExpectWithOffset (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/358">#358</a>) [beea727]</li> </ul> <h2>v1.6.0</h2> <h3>Features</h3> <ul> <li>Display special chars on error [41e1b26]</li> <li>Add BeElementOf matcher [6a48b48]</li> </ul> <h3>Fixes</h3> <ul> <li>Remove duplication in XML matcher tests [cc1a6cb]</li> <li>Remove unnecessary conversions (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/357">#357</a>) [7bf756a]</li> <li>Fixed import order (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/353">#353</a>) [2e3b965]</li> <li>Added missing error handling in test (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/355">#355</a>) [c98d3eb]</li> </ul> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/onsi/gomega/blob/master/CHANGELOG.md">github.com/onsi/gomega's changelog</a>.</em></p> <blockquote> <h2>1.10.1</h2> <h3>Fixes</h3> <ul> <li>Update dependencies (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/389">#389</a>) [9f5eecd]</li> </ul> <h2>1.10.0</h2> <h3>Features</h3> <ul> <li>Add HaveHTTPStatusMatcher (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/378">#378</a>) [f335c94]</li> <li>Changed matcher for content-type in VerifyJSONRepresenting (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/377">#377</a>) [6024f5b]</li> <li>Make ghttp usable with x-unit style tests (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/376">#376</a>) [c0be499]</li> <li>Implement PanicWith matcher (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/381">#381</a>) [f8032b4]</li> </ul> <h2>1.9.0</h2> <h3>Features</h3> <ul> <li>Add ContainElements matcher (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/370">#370</a>) [2f57380]</li> <li>Output missing and extra elements in ConsistOf failure message [a31eda7]</li> <li>Document method LargestMatching [7c5a280]</li> </ul> <h2>1.8.1</h2> <h3>Fixes</h3> <ul> <li>Fix unexpected MatchError() behaviour (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/375">#375</a>) [8ae7b2f]</li> </ul> <h2>1.8.0</h2> <h3>Features</h3> <ul> <li>Allow optional description to be lazily evaluated function (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/364">#364</a>) [bf64010]</li> <li>Support wrapped errors (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/359">#359</a>) [0a981cb]</li> </ul> <h2>1.7.1</h2> <h3>Fixes</h3> <ul> <li>Bump go-yaml version to cover fixed ddos heuristic (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/362">#362</a>) [95e431e]</li> </ul> <h2>1.7.0</h2> <h3>Features</h3> <ul> <li>export format property variables (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/347">#347</a>) [642e5ba]</li> </ul> <h3>Fixes</h3> <ul> <li>minor fix in the documentation of ExpectWithOffset (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/358">#358</a>) [beea727]</li> </ul> <h2>1.6.0</h2> <h3>Features</h3> <ul> <li>Display special chars on error [41e1b26]</li> <li>Add BeElementOf matcher [6a48b48]</li> </ul> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/onsi/gomega/commit/904ac6ab26e9a888bdff3467eea03b6122a1c027"><code>904ac6a</code></a> v1.10.1</li> <li><a href="https://github.com/onsi/gomega/commit/9f5eecdd34bb4142e5bd5f78aa68bb1081149b33"><code>9f5eecd</code></a> Update dependencies (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/389">#389</a>)</li> <li><a href="https://github.com/onsi/gomega/commit/1a3d249459a44387a05ca2d2c2b3d5f3db596dcb"><code>1a3d249</code></a> v1.10.0</li> <li><a href="https://github.com/onsi/gomega/commit/504a46fc0300fea5274005db89e1b073e76d328c"><code>504a46f</code></a> Test against 1.14 and remove 1.12</li> <li><a href="https://github.com/onsi/gomega/commit/f22b9157bb23252230344f3f85ea3930def1d155"><code>f22b915</code></a> Produce more descriptive failure messages when PanicWith() fails.</li> <li><a href="https://github.com/onsi/gomega/commit/f8032b4304db5ccf71a3de1e5280bc22231cd3c5"><code>f8032b4</code></a> Implement <code>PanicWith()</code>.</li> <li><a href="https://github.com/onsi/gomega/commit/c0be49994280db30b6b68390f67126d773bc5558"><code>c0be499</code></a> ghttp with t</li> <li><a href="https://github.com/onsi/gomega/commit/6024f5bbe35dee8d348ec498fd7eb394236a81c2"><code>6024f5b</code></a> Changed matcher for content-type in VerifyJSONRepresenting (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/377">#377</a>)</li> <li><a href="https://github.com/onsi/gomega/commit/f335c945211abcde9786c991f7541d1ce21f0d27"><code>f335c94</code></a> Add HaveHTTPStatus matcher (<a href="https://github-redirect.dependabot.com/onsi/gomega/issues/378">#378</a>)</li> <li><a href="https://github.com/onsi/gomega/commit/6be6c439588487cd908a3a700795660c2a16dfec"><code>6be6c43</code></a> v1.9.0</li> <li>Additional commits viewable in <a href="https://github.com/onsi/gomega/compare/v1.4.3...v1.10.1">compare view</a></li> </ul> </details> <br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Note: This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.
You can always request more updates by clicking Bump now in your Dependabot dashboard.
<details> <summary>Dependabot commands and options</summary> <br />
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)@dependabot use these labelswill set the current labels as the default for future PRs for this repo and language@dependabot use these reviewerswill set the current reviewers as the default for future PRs for this repo and language@dependabot use these assigneeswill set the current assignees as the default for future PRs for this repo and language@dependabot use this milestonewill set the current milestone as the default for future PRs for this repo and language@dependabot badge mewill comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot dashboard:
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
pr closed time in a month
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in a month
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in a month
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in a month
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in a month
issue closedxchapter7x/hcunit
Potential import collision: import path should be "k8s.io/helm", not "github.com/helm/helm".
Background
I find that k8s.io/helm and github.com/helm/helm coexist in this repo:
https://github.com/xchapter7x/hcunit/blob/master/go.mod (Line 15 & 31)
github.com/helm/helm v2.14.3+incompatible
k8s.io/helm v2.14.3+incompatible
The helm/helm has already renamed it’s import path from "github.com/helm/helm" to "k8s.io/helm".
https://github.com/helm/helm/blob/v2.14.3/pkg/chartutil/values_test.go#L31
package chartutil
import (
…
"k8s.io/helm/pkg/proto/hapi/chart"
"k8s.io/helm/pkg/timeconv"
"k8s.io/helm/pkg/version"
)
…
The "k8s.io/helm" and "github.com/helm/helm" are the same repos. This will work in isolation, bring about potential risks and problems.
So, why not get rid of the old import path "github.com/helm/helm", use "k8s.io/helm" instead.
Solution
Replace all the old import paths, change "github.com/helm/helm" to "k8s.io/helm".
Where did you import it: https://github.com/xchapter7x/hcunit/search?q=github.com%2Fhelm%2Fhelm&unscoped_q=github.com%2Fhelm%2Fhelm
closed time in a month
KateGo520issue commentxchapter7x/hcunit
Potential import collision: import path should be "k8s.io/helm", not "github.com/helm/helm".
this use of duplicate replica dependencies has now been addressed: https://github.com/xchapter7x/hcunit/commit/3fdf4a52d9ad14490633ce6e018ab9d73f71554e
and is in the latest release: https://github.com/xchapter7x/hcunit/releases/tag/v0.7.5
comment created time in a month
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in a month
created tagxchapter7x/hcunit
Helm Chart Unit: helps to unit test rendering of your templates using policies
created time in a month
push eventxchapter7x/hcunit
commit sha 3fdf4a52d9ad14490633ce6e018ab9d73f71554e
Removes replica duplicat helm depedencies we should only use a single version of a dependency. this fixes an issue where we were importing helm libs from 2 different sources of truth. https://github.com/xchapter7x/hcunit/issues/7
push time in a month
issue commentxchapter7x/hcunit
Potential import collision: import path should be "k8s.io/helm", not "github.com/helm/helm".
Hi @KateGo520
Thanks for bringing this up. Honestly, I think this was just an oversight and an error on my part.
I'd be happy to merge in a PR if you have a WIP in a branch already? If not, I can make the suggested changes.
One question I have though, is this causing an issue somewhere? Is there a breaking test case I can add somewhere or is this just poor dependency hygiene?
Thanks for being engaged. I hope you are finding value in hcunit. Please let me know if you have any suggestions or feedback on this tool. Insights on how you are using it would be most helpful as well :)
comment created time in a month
issue commentopen-policy-agent/conftest
i've had a lot of success using dependabot for this https://dependabot.com/go/ Its a github marketplace integration and relatively easy to setup https://github.com/marketplace/dependabot-preview
:)
comment created time in 2 months
issue closedxchapter7x/clarity
Custom Rules to test against Terraform templates
Hi,
Is it possible write to custom rules to test Terraform files.
Regards, TechGirl-3
closed time in 2 months
TechGirl-3issue closedxchapter7x/clarity
Clarity testing for checking resource tags
Hi,
I am new to clarity test tool. I wanted to know whether clarity can be used to check whether tags are added to AWS resources or not.
Any suggestions here would be helpful.
Regards, Reena
closed time in 2 months
goodwinsagarissue commentopen-policy-agent/conftest
Validate yaml structure with --combine
@dimakievua ,
i know this is an old issue... apologies for the late response. I was just looking into this. I am able to reproduce the behavior you describe. It is by design.
if you look at the yaml parser here: https://github.com/open-policy-agent/conftest/blob/master/parser/yaml/yaml.go#L17-L23
it is checking to see if there are multiple documents in the yaml file. If there are multiple, then it uses an array, b/c multiple documents make sense to surface in that data structure. If there is only a single document in the yaml file it will use an Object, b/c that is the natural data structure for a yaml object. (this is the assumption/decision on how to treat yaml files currently. Open to explore changing it)
Now when calling combine, it just takes all of the files and appends them to an array. The elements of that array will vary depending upon the datastructure used in the file.
Now that I clearly understand the specific behavior you reference, lets talk about your requested change.
It would seem that you are looking for a combined array to have a consistent datastructure in each element? I am guessing this makes it easier for you to parse/process when writing policies? This makes total sense, and i can see how a bit of type safety and consistency would improve the UX here.
Some possible paths forward: A) just make a change to your file structure if you want it to be parsed in a specific way. You described your current approach above.
B) Alternatively, we might decide that all yaml files be treated as being an array, to accommodate for multiple documents. If there is only 1 document, it will just be an array of 1 element.
Open to ideas on other approaches or implementations. :)
comment created time in 2 months
push eventxchapter7x/conftest
commit sha be031f8f0bc7c2c8cfeaa267fa578cd24528a726
allow rules for be of any form that starts with warn or deny
commit sha 5530659809ce8a27eb13b37563dd83ba148d18f7
add regex
commit sha f2bb061f66ed3ae555fe0e0b54c3c9cc9fe6351d
Merge pull request #31 from xchapter7x/master support HCL .tf files
commit sha ed45368ad725be351cc633c2eb4be05fcdc555f8
Merge branch 'bjr-rule-multiple' of https://github.com/brendanjryan/conftest into brendanjryan-bjr-rule-multiple
commit sha a382ec3d8ec73bad0a799938d316fa4b9a89daf0
Update release config for new package layout
commit sha 980e5bdfcfc0b288b24aa891666825511acc65d1
Update dependencies
commit sha d9113ca27bb36e54471ce82084b6577da94889ad
Split parsers
commit sha 6838a79b62304757da91f45f583102ef70b17d51
Merge pull request #36 from jpreese/parser-split Split parsers
commit sha 417f9fdb55a5bb33c2a553d82f9d630185db482f
Simplify policy package
commit sha d6e1620f472ecab6bb1f30fc82c583f18fa1bf11
Add test for pull command
commit sha 2a3f17bf3671cdc948b47884401e4c18a8d14bac
Merge pull request #37 from jpreese/pull-test Pull test
commit sha 6ebddd76de75a516badaa1a233872c9b85ee66ae
Fix issue with repeated output If you used the same name for multiple tests, ie. called them all deny, you got repeated output. The test commands needs some refactoring, to split out the utilities and test them independently. For the moment to get this fix out quickly I've just added an acceptance test which works but is a little too coupled to the current output.
commit sha 098534c936fffc0bd0590ff07671947c57eaaa60
Other flag help is leading lower case
commit sha 1e1565b918d858b11d7eecfe8b975302e99d6af1
Fix version output The refactoring moved the paths where the version information was injected into.
commit sha ab52c72aa73dcd99fb090f225782f238d1082edb
add cue support
commit sha 32db1026d1e022dda4fd08df418a8e210255e838
Merge pull request #43 from boranx/feat/Add-cue-support add cue support
commit sha a3dbb07522f7882b4001aff348bc956625682769
chore: Update readme with slack channel
commit sha cc3fdd420d58af2886402c640747887729de0470
Merge pull request #46 from Blokje5/chore/add-slack-to-readme chore: Update readme with slack channel
commit sha 903dc269a829841472e19762d6489cf1a9c14d6a
Always pull the latest parent image when building the Docker image
commit sha 2dba4794c285c33c5d195341287a811f4b99e3cc
add ini support
push time in 2 months
issue commentxchapter7x/clarity
Clarity testing for checking resource tags
Hi @goodwinsagar ,
Thanks for reaching out.
Yes, you can check for the existence of tags.
For something like this:
resource "aws_instance" "web" {
ami = "${data.aws_ami.ubuntu.id}"
instance_type = "t2.micro"
tags = {
Name = "HelloWorld"
}
}
one could craft a gherkin like this:
Given HCL2
When a "aws_instance" of type "resource"
Then attribute "tags" exists
you could also check for equality or regex to make sure particular tags are added
comment created time in 2 months
issue commentxchapter7x/clarity
Custom Rules to test against Terraform templates
Hi @TechGirl-3 ,
Thanks for reaching out.
By custom rules, im guessing you mean you'd like to write your own gherkins that are not currently in the list of supported matchers?
Clarity is really a purpose built extension on top of https://github.com/cucumber/godog . What this allows us to do is to author our own gherkins, and using the clarity cli (indirectly the godog cli) compile a new binary which includes any new matchers you might desire.
You could also fork the repo, add any new gherkins you'd like, and contribute them back in the form of a PR. I'd be happy to accept them :)
-John
comment created time in 2 months