Fix query and tests (#17)
This commit is contained in:
@@ -101,6 +101,7 @@ func TestRegoEvaluator_Evaluate(t *testing.T) {
|
||||
|
||||
if tc.expectSuccess {
|
||||
assert.NoErrorf(t, err, "Evaluate failed")
|
||||
assert.True(t, rs.Allowed(), "Evaluate should have succeeded")
|
||||
} else {
|
||||
assert.False(t, rs.Allowed(), "Evaluate should have failed")
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type regoEvaluator struct {
|
||||
func NewRegoEvaluator(debug bool) PolicyEvaluator {
|
||||
return ®oEvaluator{
|
||||
debug: debug,
|
||||
query: "data.attestations.allow",
|
||||
query: "data.attest.allow",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package attest
|
||||
|
||||
import rego.v1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package attest
|
||||
|
||||
import rego.v1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package attest
|
||||
|
||||
import rego.v1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package attest
|
||||
|
||||
import rego.v1
|
||||
|
||||
|
||||
2
test/testdata/local-policy/doi/policy.rego
vendored
2
test/testdata/local-policy/doi/policy.rego
vendored
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package attest
|
||||
|
||||
import rego.v1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package docker
|
||||
package attest
|
||||
import rego.v1
|
||||
|
||||
config := {"keys": []}
|
||||
|
||||
Reference in New Issue
Block a user