@@ -106,7 +106,7 @@ func (s *ClientSuite) SetUpTest(c *C) {
106
106
"timestamp" : s .genKey (c , "timestamp" ),
107
107
}
108
108
c .Assert (s .repo .AddTarget ("foo.txt" , nil ), IsNil )
109
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
109
+ c .Assert (s .repo .Snapshot (), IsNil )
110
110
c .Assert (s .repo .Timestamp (), IsNil )
111
111
c .Assert (s .repo .Commit (), IsNil )
112
112
@@ -162,7 +162,7 @@ func (s *ClientSuite) syncRemote(c *C) {
162
162
163
163
func (s * ClientSuite ) addRemoteTarget (c * C , name string ) {
164
164
c .Assert (s .repo .AddTarget (name , nil ), IsNil )
165
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
165
+ c .Assert (s .repo .Snapshot (), IsNil )
166
166
c .Assert (s .repo .Timestamp (), IsNil )
167
167
c .Assert (s .repo .Commit (), IsNil )
168
168
s .syncRemote (c )
@@ -245,7 +245,7 @@ func (s *ClientSuite) TestInitRootTooLarge(c *C) {
245
245
246
246
func (s * ClientSuite ) TestInitRootExpired (c * C ) {
247
247
s .genKeyExpired (c , "targets" )
248
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
248
+ c .Assert (s .repo .Snapshot (), IsNil )
249
249
c .Assert (s .repo .Timestamp (), IsNil )
250
250
c .Assert (s .repo .Commit (), IsNil )
251
251
s .syncRemote (c )
@@ -325,7 +325,7 @@ func (s *ClientSuite) TestNewRoot(c *C) {
325
325
326
326
// update metadata
327
327
c .Assert (s .repo .Sign ("targets.json" ), IsNil )
328
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
328
+ c .Assert (s .repo .Snapshot (), IsNil )
329
329
c .Assert (s .repo .Timestamp (), IsNil )
330
330
c .Assert (s .repo .Commit (), IsNil )
331
331
s .syncRemote (c )
@@ -389,7 +389,7 @@ func (s *ClientSuite) TestNewTimestampKey(c *C) {
389
389
newIDs := s .genKey (c , "timestamp" )
390
390
391
391
// generate new snapshot (because root has changed) and timestamp
392
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
392
+ c .Assert (s .repo .Snapshot (), IsNil )
393
393
c .Assert (s .repo .Timestamp (), IsNil )
394
394
c .Assert (s .repo .Commit (), IsNil )
395
395
s .syncRemote (c )
@@ -426,7 +426,7 @@ func (s *ClientSuite) TestNewSnapshotKey(c *C) {
426
426
newIDs := s .genKey (c , "snapshot" )
427
427
428
428
// generate new snapshot and timestamp
429
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
429
+ c .Assert (s .repo .Snapshot (), IsNil )
430
430
c .Assert (s .repo .Timestamp (), IsNil )
431
431
c .Assert (s .repo .Commit (), IsNil )
432
432
s .syncRemote (c )
@@ -466,7 +466,7 @@ func (s *ClientSuite) TestNewTargetsKey(c *C) {
466
466
467
467
// re-sign targets and generate new snapshot and timestamp
468
468
c .Assert (s .repo .Sign ("targets.json" ), IsNil )
469
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
469
+ c .Assert (s .repo .Snapshot (), IsNil )
470
470
c .Assert (s .repo .Timestamp (), IsNil )
471
471
c .Assert (s .repo .Commit (), IsNil )
472
472
s .syncRemote (c )
@@ -512,7 +512,7 @@ func (s *ClientSuite) TestLocalExpired(c *C) {
512
512
513
513
// locally expired snapshot.json is ok
514
514
version = client .snapshotVer
515
- c .Assert (s .repo .SnapshotWithExpires (tuf . CompressionTypeNone , s .expiredTime ), IsNil )
515
+ c .Assert (s .repo .SnapshotWithExpires (s .expiredTime ), IsNil )
516
516
s .syncLocal (c )
517
517
s .withMetaExpired (func () {
518
518
c .Assert (client .getLocalMeta (), IsNil )
@@ -585,7 +585,7 @@ func (s *ClientSuite) TestUpdateRemoteExpired(c *C) {
585
585
s .assertErrExpired (c , err , "timestamp.json" )
586
586
})
587
587
588
- c .Assert (s .repo .SnapshotWithExpires (tuf . CompressionTypeNone , s .expiredTime ), IsNil )
588
+ c .Assert (s .repo .SnapshotWithExpires (s .expiredTime ), IsNil )
589
589
c .Assert (s .repo .Timestamp (), IsNil )
590
590
s .syncRemote (c )
591
591
s .withMetaExpired (func () {
@@ -594,7 +594,7 @@ func (s *ClientSuite) TestUpdateRemoteExpired(c *C) {
594
594
})
595
595
596
596
c .Assert (s .repo .AddTargetWithExpires ("bar.txt" , nil , s .expiredTime ), IsNil )
597
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
597
+ c .Assert (s .repo .Snapshot (), IsNil )
598
598
c .Assert (s .repo .Timestamp (), IsNil )
599
599
s .syncRemote (c )
600
600
s .withMetaExpired (func () {
@@ -604,7 +604,7 @@ func (s *ClientSuite) TestUpdateRemoteExpired(c *C) {
604
604
605
605
s .genKeyExpired (c , "timestamp" )
606
606
c .Assert (s .repo .RemoveTarget ("bar.txt" ), IsNil )
607
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
607
+ c .Assert (s .repo .Snapshot (), IsNil )
608
608
c .Assert (s .repo .Timestamp (), IsNil )
609
609
c .Assert (s .repo .Commit (), IsNil )
610
610
s .syncRemote (c )
@@ -631,7 +631,7 @@ func (s *ClientSuite) TestUpdateLocalRootExpiredKeyChange(c *C) {
631
631
632
632
// update metadata
633
633
c .Assert (s .repo .Sign ("targets.json" ), IsNil )
634
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
634
+ c .Assert (s .repo .Snapshot (), IsNil )
635
635
c .Assert (s .repo .Timestamp (), IsNil )
636
636
c .Assert (s .repo .Commit (), IsNil )
637
637
s .syncRemote (c )
@@ -651,7 +651,7 @@ func (s *ClientSuite) TestUpdateMixAndMatchAttack(c *C) {
651
651
// generate metadata with an explicit expires so we can make predictable changes
652
652
expires := time .Now ().Add (time .Hour )
653
653
c .Assert (s .repo .AddTargetWithExpires ("foo.txt" , nil , expires ), IsNil )
654
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
654
+ c .Assert (s .repo .Snapshot (), IsNil )
655
655
c .Assert (s .repo .Timestamp (), IsNil )
656
656
s .syncRemote (c )
657
657
client := s .updatedClient (c )
@@ -664,7 +664,7 @@ func (s *ClientSuite) TestUpdateMixAndMatchAttack(c *C) {
664
664
665
665
// generate new remote metadata, but replace targets.json with the old one
666
666
c .Assert (s .repo .AddTargetWithExpires ("bar.txt" , nil , expires ), IsNil )
667
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
667
+ c .Assert (s .repo .Snapshot (), IsNil )
668
668
c .Assert (s .repo .Timestamp (), IsNil )
669
669
s .syncRemote (c )
670
670
newTargets , ok := s .remote .meta ["targets.json" ]
@@ -679,7 +679,7 @@ func (s *ClientSuite) TestUpdateMixAndMatchAttack(c *C) {
679
679
680
680
// do the same but keep the size the same
681
681
c .Assert (s .repo .RemoveTargetWithExpires ("foo.txt" , expires ), IsNil )
682
- c .Assert (s .repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
682
+ c .Assert (s .repo .Snapshot (), IsNil )
683
683
c .Assert (s .repo .Timestamp (), IsNil )
684
684
s .syncRemote (c )
685
685
s .remote .meta ["targets.json" ] = oldTargets
@@ -937,7 +937,7 @@ func (s *ClientSuite) TestUnknownKeyIDs(c *C) {
937
937
// the TUF-0.9 update workflow, where we decide to update the root
938
938
// metadata when we observe a new root through the snapshot.
939
939
repo , err := tuf .NewRepo (s .store )
940
- c .Assert (repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
940
+ c .Assert (repo .Snapshot (), IsNil )
941
941
c .Assert (repo .Timestamp (), IsNil )
942
942
c .Assert (repo .Commit (), IsNil )
943
943
s .syncRemote (c )
@@ -964,7 +964,7 @@ func generateRepoFS(c *C, dir string, files map[string][]byte, consistentSnapsho
964
964
c .Assert (ioutil .WriteFile (path , data , 0644 ), IsNil )
965
965
c .Assert (repo .AddTarget (file , nil ), IsNil )
966
966
}
967
- c .Assert (repo .Snapshot (tuf . CompressionTypeNone ), IsNil )
967
+ c .Assert (repo .Snapshot (), IsNil )
968
968
c .Assert (repo .Timestamp (), IsNil )
969
969
c .Assert (repo .Commit (), IsNil )
970
970
return repo
0 commit comments