replace sigstore-go test bundle func
Signed-off-by: Meredith Lancaster <malancas@github.com>
This commit is contained in:
parent
68b1d8bf29
commit
35ec7f251c
1 changed files with 7 additions and 3 deletions
|
|
@ -5,13 +5,17 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/sigstore/sigstore-go/pkg/bundle"
|
||||
sgData "github.com/sigstore/sigstore-go/pkg/testing/data"
|
||||
)
|
||||
|
||||
//go:embed sigstore-js-2.1.0-bundle.json
|
||||
var SigstoreBundleRaw []byte
|
||||
|
||||
// SigstoreBundle returns a test *sigstore.Bundle
|
||||
// SigstoreBundle returns a test sigstore-go bundle.Bundle
|
||||
func SigstoreBundle(t *testing.T) *bundle.Bundle {
|
||||
return sgData.TestBundle(t, SigstoreBundleRaw)
|
||||
b := &bundle.Bundle{}
|
||||
err := b.UnmarshalJSON(SigstoreBundleRaw)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to unmarshal sigstore bundle: %v", err)
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue