test: change test to use yaml file instead
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
this isn't a rego policy
|
||||
1
pkg/policy/testdata/mock-tuf-no-rego/doi/policy.yaml
vendored
Normal file
1
pkg/policy/testdata/mock-tuf-no-rego/doi/policy.yaml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
policy: "this is not rego"
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user