(t *testing.T)
| 348 | } |
| 349 | |
| 350 | func TestJSONOutput(t *testing.T) { |
| 351 | testIO, _, out, _ := iostreams.Test() |
| 352 | opts := Options{ |
| 353 | ArtifactPath: artifactPath, |
| 354 | BundlePath: bundlePath, |
| 355 | DigestAlgorithm: "sha512", |
| 356 | APIClient: api.NewTestClient(), |
| 357 | Logger: io.NewHandler(testIO), |
| 358 | OCIClient: oci.MockClient{}, |
| 359 | OIDCIssuer: verification.GitHubOIDCIssuer, |
| 360 | Owner: "sigstore", |
| 361 | PredicateType: verification.SLSAPredicateV1, |
| 362 | SANRegex: "^https://github.com/sigstore/", |
| 363 | SigstoreVerifier: verification.NewMockSigstoreVerifier(t), |
| 364 | exporter: cmdutil.NewJSONExporter(), |
| 365 | } |
| 366 | require.NoError(t, runVerify(&opts)) |
| 367 | |
| 368 | var target []*verification.AttestationProcessingResult |
| 369 | err := json.Unmarshal(out.Bytes(), &target) |
| 370 | require.NoError(t, err) |
| 371 | } |
| 372 | |
| 373 | func TestRunVerify(t *testing.T) { |
| 374 | logger := io.NewTestHandler() |
nothing calls this directly
no test coverage detected