@@ -33,7 +33,7 @@ func TestSafeWriter_BadInput_MissingRoot(t *testing.T) {
33
33
pc := NewTestProjectContext (h , safeWriterProject )
34
34
defer pc .Release ()
35
35
36
- sw , _ := NewSafeWriter (nil , nil , nil , VendorOnChanged , defaultCascadingPruneOptions ())
36
+ sw , _ := NewSafeWriter (nil , nil , nil , VendorOnChanged , defaultCascadingPruneOptions (), nil )
37
37
err := sw .Write ("" , pc .SourceManager , true , nil )
38
38
39
39
if err == nil {
@@ -51,7 +51,7 @@ func TestSafeWriter_BadInput_MissingSourceManager(t *testing.T) {
51
51
pc .CopyFile (LockName , safeWriterGoldenLock )
52
52
pc .Load ()
53
53
54
- sw , _ := NewSafeWriter (nil , nil , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions ())
54
+ sw , _ := NewSafeWriter (nil , nil , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions (), nil )
55
55
err := sw .Write (pc .Project .AbsRoot , nil , true , nil )
56
56
57
57
if err == nil {
@@ -67,7 +67,7 @@ func TestSafeWriter_BadInput_ForceVendorMissingLock(t *testing.T) {
67
67
pc := NewTestProjectContext (h , safeWriterProject )
68
68
defer pc .Release ()
69
69
70
- _ , err := NewSafeWriter (nil , nil , nil , VendorAlways , defaultCascadingPruneOptions ())
70
+ _ , err := NewSafeWriter (nil , nil , nil , VendorAlways , defaultCascadingPruneOptions (), nil )
71
71
if err == nil {
72
72
t .Fatal ("should have errored without a lock when forceVendor is true, but did not" )
73
73
} else if ! strings .Contains (err .Error (), "newLock" ) {
@@ -83,7 +83,7 @@ func TestSafeWriter_BadInput_OldLockOnly(t *testing.T) {
83
83
pc .CopyFile (LockName , safeWriterGoldenLock )
84
84
pc .Load ()
85
85
86
- _ , err := NewSafeWriter (nil , pc .Project .Lock , nil , VendorAlways , defaultCascadingPruneOptions ())
86
+ _ , err := NewSafeWriter (nil , pc .Project .Lock , nil , VendorAlways , defaultCascadingPruneOptions (), nil )
87
87
if err == nil {
88
88
t .Fatal ("should have errored with only an old lock, but did not" )
89
89
} else if ! strings .Contains (err .Error (), "oldLock" ) {
@@ -97,7 +97,7 @@ func TestSafeWriter_BadInput_NonexistentRoot(t *testing.T) {
97
97
pc := NewTestProjectContext (h , safeWriterProject )
98
98
defer pc .Release ()
99
99
100
- sw , _ := NewSafeWriter (nil , nil , nil , VendorOnChanged , defaultCascadingPruneOptions ())
100
+ sw , _ := NewSafeWriter (nil , nil , nil , VendorOnChanged , defaultCascadingPruneOptions (), nil )
101
101
102
102
missingroot := filepath .Join (pc .Project .AbsRoot , "nonexistent" )
103
103
err := sw .Write (missingroot , pc .SourceManager , true , nil )
@@ -115,7 +115,7 @@ func TestSafeWriter_BadInput_RootIsFile(t *testing.T) {
115
115
pc := NewTestProjectContext (h , safeWriterProject )
116
116
defer pc .Release ()
117
117
118
- sw , _ := NewSafeWriter (nil , nil , nil , VendorOnChanged , defaultCascadingPruneOptions ())
118
+ sw , _ := NewSafeWriter (nil , nil , nil , VendorOnChanged , defaultCascadingPruneOptions (), nil )
119
119
120
120
fileroot := pc .CopyFile ("fileroot" , "txn_writer/badinput_fileroot" )
121
121
err := sw .Write (fileroot , pc .SourceManager , true , nil )
@@ -139,7 +139,7 @@ func TestSafeWriter_Manifest(t *testing.T) {
139
139
pc .CopyFile (ManifestName , safeWriterGoldenManifest )
140
140
pc .Load ()
141
141
142
- sw , _ := NewSafeWriter (pc .Project .Manifest , nil , nil , VendorOnChanged , defaultCascadingPruneOptions ())
142
+ sw , _ := NewSafeWriter (pc .Project .Manifest , nil , nil , VendorOnChanged , defaultCascadingPruneOptions (), nil )
143
143
144
144
// Verify prepared actions
145
145
if ! sw .HasManifest () {
@@ -181,7 +181,7 @@ func TestSafeWriter_ManifestAndUnmodifiedLock(t *testing.T) {
181
181
pc .CopyFile (LockName , safeWriterGoldenLock )
182
182
pc .Load ()
183
183
184
- sw , _ := NewSafeWriter (pc .Project .Manifest , pc .Project .Lock , pc .Project .Lock , VendorOnChanged , defaultCascadingPruneOptions ())
184
+ sw , _ := NewSafeWriter (pc .Project .Manifest , pc .Project .Lock , pc .Project .Lock , VendorOnChanged , defaultCascadingPruneOptions (), nil )
185
185
186
186
// Verify prepared actions
187
187
if ! sw .HasManifest () {
@@ -226,7 +226,7 @@ func TestSafeWriter_ManifestAndUnmodifiedLockWithForceVendor(t *testing.T) {
226
226
pc .CopyFile (LockName , safeWriterGoldenLock )
227
227
pc .Load ()
228
228
229
- sw , _ := NewSafeWriter (pc .Project .Manifest , pc .Project .Lock , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions ())
229
+ sw , _ := NewSafeWriter (pc .Project .Manifest , pc .Project .Lock , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions (), nil )
230
230
231
231
// Verify prepared actions
232
232
if ! sw .HasManifest () {
@@ -273,12 +273,12 @@ func TestSafeWriter_ForceVendorWhenVendorAlreadyExists(t *testing.T) {
273
273
pc .CopyFile (LockName , safeWriterGoldenLock )
274
274
pc .Load ()
275
275
276
- sw , _ := NewSafeWriter (nil , pc .Project .Lock , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions ())
276
+ sw , _ := NewSafeWriter (nil , pc .Project .Lock , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions (), nil )
277
277
err := sw .Write (pc .Project .AbsRoot , pc .SourceManager , true , nil )
278
278
h .Must (errors .Wrap (err , "SafeWriter.Write failed" ))
279
279
280
280
// Verify prepared actions
281
- sw , _ = NewSafeWriter (nil , nil , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions ())
281
+ sw , _ = NewSafeWriter (nil , nil , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions (), nil )
282
282
if sw .HasManifest () {
283
283
t .Fatal ("Did not expect the payload to contain the manifest" )
284
284
}
@@ -325,7 +325,7 @@ func TestSafeWriter_NewLock(t *testing.T) {
325
325
defer lf .Close ()
326
326
newLock , err := readLock (lf )
327
327
h .Must (err )
328
- sw , _ := NewSafeWriter (nil , nil , newLock , VendorOnChanged , defaultCascadingPruneOptions ())
328
+ sw , _ := NewSafeWriter (nil , nil , newLock , VendorOnChanged , defaultCascadingPruneOptions (), nil )
329
329
330
330
// Verify prepared actions
331
331
if sw .HasManifest () {
@@ -372,7 +372,7 @@ func TestSafeWriter_NewLockSkipVendor(t *testing.T) {
372
372
defer lf .Close ()
373
373
newLock , err := readLock (lf )
374
374
h .Must (err )
375
- sw , _ := NewSafeWriter (nil , nil , newLock , VendorNever , defaultCascadingPruneOptions ())
375
+ sw , _ := NewSafeWriter (nil , nil , newLock , VendorNever , defaultCascadingPruneOptions (), nil )
376
376
377
377
// Verify prepared actions
378
378
if sw .HasManifest () {
@@ -433,7 +433,7 @@ func TestSafeWriter_VendorDotGitPreservedWithForceVendor(t *testing.T) {
433
433
pc .CopyFile (LockName , safeWriterGoldenLock )
434
434
pc .Load ()
435
435
436
- sw , _ := NewSafeWriter (pc .Project .Manifest , pc .Project .Lock , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions ())
436
+ sw , _ := NewSafeWriter (pc .Project .Manifest , pc .Project .Lock , pc .Project .Lock , VendorAlways , defaultCascadingPruneOptions (), nil )
437
437
438
438
// Verify prepared actions
439
439
if ! sw .HasManifest () {
0 commit comments