@@ -7692,8 +7692,9 @@ func testExportAttestations(t *testing.T, sb integration.Sandbox) {
7692
7692
7693
7693
for _ , p := range ps {
7694
7694
var attest intoto.Statement
7695
- dt := m [path .Join (strings .ReplaceAll (platforms .Format (p ), "/" , "_" ), "test.attestation.json" )].Data
7696
- require .NoError (t , json .Unmarshal (dt , & attest ))
7695
+ item := m [path .Join (strings .ReplaceAll (platforms .Format (p ), "/" , "_" ), "test.attestation.json" )]
7696
+ require .NotNil (t , item )
7697
+ require .NoError (t , json .Unmarshal (item .Data , & attest ))
7697
7698
7698
7699
require .Equal (t , "https://in-toto.io/Statement/v0.1" , attest .Type )
7699
7700
require .Equal (t , "https://example.com/attestations/v1.0" , attest .PredicateType )
@@ -7705,8 +7706,9 @@ func testExportAttestations(t *testing.T, sb integration.Sandbox) {
7705
7706
}}, attest .Subject )
7706
7707
7707
7708
var attest2 intoto.Statement
7708
- dt = m [path .Join (strings .ReplaceAll (platforms .Format (p ), "/" , "_" ), "test.attestation2.json" )].Data
7709
- require .NoError (t , json .Unmarshal (dt , & attest2 ))
7709
+ item = m [path .Join (strings .ReplaceAll (platforms .Format (p ), "/" , "_" ), "test.attestation2.json" )]
7710
+ require .NotNil (t , item )
7711
+ require .NoError (t , json .Unmarshal (item .Data , & attest2 ))
7710
7712
7711
7713
require .Equal (t , "https://in-toto.io/Statement/v0.1" , attest2 .Type )
7712
7714
require .Equal (t , "https://example.com/attestations2/v1.0" , attest2 .PredicateType )
0 commit comments