diff --git a/pkg/policy/policy_test.go b/pkg/policy/policy_test.go index bf389fb..aec853e 100644 --- a/pkg/policy/policy_test.go +++ b/pkg/policy/policy_test.go @@ -65,7 +65,7 @@ func TestRegoEvaluator_Evaluate(t *testing.T) { {repo: "testdata/mock-tuf-wrong-key", expectSuccess: false, input: defaultInput, resolver: defaultResolver}, {repo: MockTufRepo, expectSuccess: true, input: &policy.PolicyInput{ Digest: "sha256:da8b190665956ea07890a0273e2a9c96bfe291662f08e2860e868eef69c34620", - Purl: "pkg:docker/test-image@test?platform=linux%2Famd64", + Purl: "pkg:docker/test-image?digest=sha256%da8b190665956ea07890a0273e2a9c96bfe291662f08e2860e868eef69c34620&platform=linux%2Famd64", IsCanonical: true, }, resolver: vsaResolver}, {repo: MockTufRepo, expectSuccess: true, input: &policy.PolicyInput{ diff --git a/test/testdata/local-policy/doi/policy.rego b/test/testdata/local-policy/doi/policy.rego index d4ec593..04a9603 100644 --- a/test/testdata/local-policy/doi/policy.rego +++ b/test/testdata/local-policy/doi/policy.rego @@ -35,12 +35,12 @@ valid_subject(sub) if { } valid_subject_name(name) if { - input.canonical + input.isCanonical print("is canonical, ignoring name") } valid_subject_name(name) if { - not input.canonical + not input.isCanonical print("valid_subject_name...") print("name:", name) print("input.purl:", input.purl)