Skip to content

Commit

Permalink
fix: e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Choudhary <[email protected]>
  • Loading branch information
vishal-chdhry committed Nov 9, 2023
1 parent 4476071 commit 6b07320
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions test/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,19 +421,12 @@ func TestExcessiveAttestations(t *testing.T) {
t.Fatal(err)
}

// Attest to create a vuln attestation
attestCommand := attest.AttestCommand{
KeyOpts: ko,
PredicatePath: vulnAttestationPath,
PredicateType: "vuln",
Timeout: 30 * time.Second,
Replace: false,
}
must(attestCommand.Exec(ctx, imgName), t)
// Attest again with replace=true, replacing the previous attestation
must(attest.AttestCmd(ctx, ko, options.RegistryOptions{}, imgName, "", "", false, vulnAttestationPath, false,
"vuln", false, 30*time.Second, false), t)
}

attOpts := options.AttestationDownloadOptions{}
_, err = cosign.FetchAttestationsForReference(ctx, ref, attOpts.PredicateType, ociremoteOpts...)
_, err = cosign.FetchAttestationsForReference(ctx, ref, ociremoteOpts...)
if err == nil {
t.Fatalf("Expected an error, but 'err' was 'nil'")
}
Expand Down Expand Up @@ -604,9 +597,6 @@ func TestExcessiveSignatures(t *testing.T) {

// Sign the image
ko := options.KeyOpts{KeyRef: privKeyPath, PassFunc: passFunc}
so := options.SignOptions{
Upload: true,
}
must(sign.SignCmd(ro, ko, options.RegistryOptions{}, nil, []string{imgName}, "", "", true, "", "", "", false, false, "", false), t)
}
err := download.SignatureCmd(ctx, options.RegistryOptions{}, imgName)
Expand Down

0 comments on commit 6b07320

Please sign in to comment.