Skip to content

Commit

Permalink
feat: Add Constraint schema validation testing (open-policy-agent#2092)
Browse files Browse the repository at this point in the history
* feat: Add Constraint schema validation testing

Add feature to "gator verify" which allows testing the schema of
Constraints.

Fixes: open-policy-agent#1989
Signed-off-by: Will Beason <willbeason@google.com>

* fix lint errors and comments

Signed-off-by: Max Smythe <smythe@google.com>

* tweak error message

Signed-off-by: Max Smythe <smythe@google.com>

Co-authored-by: Will Beason <willbeason@google.com>
Co-authored-by: Max Smythe <smythe@google.com>
Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com>
Signed-off-by: Christoph Fraundorfer <christoph.fraundorfer@allianzdirect.de>
  • Loading branch information
4 people authored and ChrisFraun committed Jun 29, 2022
1 parent d7d9719 commit 5387394
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ require (
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.19.0
github.com/open-policy-agent/cert-controller v0.3.0
<<<<<<< HEAD
github.com/open-policy-agent/frameworks/constraint v0.0.0-20220621170157-36b73e182701
=======
github.com/open-policy-agent/frameworks/constraint v0.0.0-20220603201627-e8d94b2fcf7a
>>>>>>> 838ee89e (feat: Add Constraint schema validation testing (#2092))
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.2
github.com/spf13/cobra v1.5.0
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -956,10 +956,17 @@ github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw=
github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro=
github.com/open-policy-agent/cert-controller v0.3.0 h1:9eUgN3yYMZsfyW7qdW8+CX9YZCUb5R5JfRTj0cqaSVg=
github.com/open-policy-agent/cert-controller v0.3.0/go.mod h1:uOQW+2tMU51vSxy1Yt162oVUTMdqLuotC0aObQxrh6k=
<<<<<<< HEAD
github.com/open-policy-agent/frameworks/constraint v0.0.0-20220621170157-36b73e182701 h1:WpDMWWpLte6RGs4UruGQ+/iuKD6WBSVCgvs4Sc/IKco=
github.com/open-policy-agent/frameworks/constraint v0.0.0-20220621170157-36b73e182701/go.mod h1:2+TcEyrHgPQqnLpYiLMME0Zt/zW1pRe7EbD6YHeN/Js=
github.com/open-policy-agent/opa v0.41.0 h1:XDTkP8bcUVuY8WOVbRY4e/KZW31+f+/cxisPc0TPe5E=
github.com/open-policy-agent/opa v0.41.0/go.mod h1:+kB8/8/4meTlq6ZmYRnvrL5nNrykd2eckDx4O6rk/dA=
=======
github.com/open-policy-agent/frameworks/constraint v0.0.0-20220603201627-e8d94b2fcf7a h1:YFthks7sIYmiOsElAwUZ48VdN9LI7ekF/vV4wYeR9mk=
github.com/open-policy-agent/frameworks/constraint v0.0.0-20220603201627-e8d94b2fcf7a/go.mod h1:8GTSaIKto8bel+l15v1Zwm9qXF3LCgdHatn7+rj5Jhw=
github.com/open-policy-agent/opa v0.40.0 h1:z/eg0ff3O1y6ovxpbL7xv+NHSwi8rVA7993sLv5Owac=
github.com/open-policy-agent/opa v0.40.0/go.mod h1:UQqv8nJ1njs2+Od1lrPFzUAApdj22ABxTO35+Vpsjz4=
>>>>>>> 838ee89e (feat: Add Constraint schema validation testing (#2092))
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
Expand Down
4 changes: 4 additions & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ github.com/onsi/gomega/types
# github.com/open-policy-agent/cert-controller v0.3.0
## explicit; go 1.17
github.com/open-policy-agent/cert-controller/pkg/rotator
<<<<<<< HEAD
# github.com/open-policy-agent/frameworks/constraint v0.0.0-20220621170157-36b73e182701
=======
# github.com/open-policy-agent/frameworks/constraint v0.0.0-20220603201627-e8d94b2fcf7a
>>>>>>> 838ee89e (feat: Add Constraint schema validation testing (#2092))
## explicit; go 1.17
github.com/open-policy-agent/frameworks/constraint/deploy
github.com/open-policy-agent/frameworks/constraint/pkg/apis
Expand Down

0 comments on commit 5387394

Please sign in to comment.