test: change test to use yaml file instead

This commit is contained in:
mrjoelkamp
2024-08-14 16:13:36 -05:00
parent 8d8f09661f
commit 5f17f97229
4 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ func loadAttestation(t *testing.T, path string) *attestation.Envelope {
func TestRegoEvaluator_Evaluate(t *testing.T) {
ctx, _ := test.Setup(t)
resolveErrorStr := "failed to resolve policy by id: policy with id non-existent-policy-id not found"
evalErrorStr := "rego_parse_error:"
evalErrorStr := "no policy evaluation result"
TestDataPath := filepath.Join("..", "..", "test", "testdata")
ExampleAttestation := filepath.Join(TestDataPath, "example_attestation.json")

View File

@@ -1 +0,0 @@
this isn't a rego policy

View File

@@ -0,0 +1 @@
policy: "this is not rego"

View File

@@ -5,7 +5,7 @@ policies:
- id: docker-official-images
description: Docker Official Images
files:
- path: doi/policy.not-rego
- path: doi/policy.yaml
rules:
- pattern: "^docker[.]io/library/(.*)$"
policy-id: docker-official-images