Skip to content

Commit

Permalink
Upgrade constraint framework (#174)
Browse files Browse the repository at this point in the history
* Upgrade constraint framework

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

* Fix broken test

Signed-off-by: Max Smythe <smythe@google.com>
  • Loading branch information
maxsmythe committed Jul 9, 2019
1 parent e3737a1 commit 33e81b9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ violation[{"msg": "denied!"}] {
Rego: `
package foo
violation[}}}//invalid//rego
violation[{"msg": "hi"}] { 1 == 1 }
anyrule[}}}//invalid//rego
`},
},
},
Expand All @@ -238,7 +241,7 @@ violation[}}}//invalid//rego
if len(status.Errors) != 1 {
return errors.New("InvalidRego template should contain 1 parse error")
} else {
if status.Errors[0].Code != "rego_parse_error" {
if status.Errors[0].Code != "create_error" {
return errors.New(fmt.Sprintf("InvalidRego template returning unexpected error %s", status.Errors[0].Code))
}
return nil
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 33e81b9

Please sign in to comment.