MCPcopy Create free account
hub / github.com/conforma/cli / createTestPolicy

Function createTestPolicy

internal/input/report_test.go:398–420  ·  view source on GitHub ↗
(t *testing.T, ctx context.Context)

Source from the content-addressed store, hash-verified

396}
397
398func createTestPolicy(t *testing.T, ctx context.Context) policy.Policy {
399 utils.SetTestRekorPublicKey(t)
400
401 policyConfiguration := `
402name: Default
403description: >-
404 Stuff and things
405sources:
406 - name: Default
407 policy:
408 - github.com/org/repo//policy
409 data:
410 - github.com/org/repo//data
411 config:
412 include:
413 - "basic"
414 exclude:
415 []
416`
417 p, err := policy.NewInputPolicy(ctx, policyConfiguration, "now")
418 assert.NoError(t, err)
419 return p
420}

Callers 6

Test_ReportJsonFunction · 0.70
Test_ReportYamlFunction · 0.70
Test_ReportSummaryFunction · 0.70
Test_ReportTextFunction · 0.70

Calls 2

SetTestRekorPublicKeyFunction · 0.92
NewInputPolicyFunction · 0.92

Tested by

no test coverage detected