(t *testing.T, ctx context.Context)
| 396 | } |
| 397 | |
| 398 | func createTestPolicy(t *testing.T, ctx context.Context) policy.Policy { |
| 399 | utils.SetTestRekorPublicKey(t) |
| 400 | |
| 401 | policyConfiguration := ` |
| 402 | name: Default |
| 403 | description: >- |
| 404 | Stuff and things |
| 405 | sources: |
| 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 | } |
no test coverage detected