Skip to content
Permalink
Browse files

Upgrade constraint framework (#174)

* 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 33e81b9f1b44edc445327a61e02f7ec64f494b7a

Some generated files are not rendered by default. Learn more.

@@ -217,7 +217,10 @@ violation[{"msg": "denied!"}] {
Rego: `
package foo
violation[}}}//invalid//rego
violation[{"msg": "hi"}] { 1 == 1 }
anyrule[}}}//invalid//rego
`},
},
},
@@ -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

Some generated files are not rendered by default. Learn more.

0 comments on commit 33e81b9

Please sign in to comment.
You can’t perform that action at this time.