@@ -30,6 +30,7 @@ func TestGetBucketAccelerateConfiguration(t *testing.T) {
30
30
}
31
31
runSnowflakeConnTest (t , func (sct * SCTest ) {
32
32
sfa := & snowflakeFileTransferAgent {
33
+ ctx : context .Background (),
33
34
sc : sct .sc ,
34
35
commandType : uploadCommand ,
35
36
srcFiles : make ([]string , 0 ),
@@ -81,6 +82,7 @@ func TestUnitDownloadWithInvalidLocalPath(t *testing.T) {
81
82
func TestUnitGetLocalFilePathFromCommand (t * testing.T ) {
82
83
runSnowflakeConnTest (t , func (sct * SCTest ) {
83
84
sfa := & snowflakeFileTransferAgent {
85
+ ctx : context .Background (),
84
86
sc : sct .sc ,
85
87
commandType : uploadCommand ,
86
88
srcFiles : make ([]string , 0 ),
@@ -110,6 +112,7 @@ func TestUnitGetLocalFilePathFromCommand(t *testing.T) {
110
112
func TestUnitProcessFileCompressionType (t * testing.T ) {
111
113
runSnowflakeConnTest (t , func (sct * SCTest ) {
112
114
sfa := & snowflakeFileTransferAgent {
115
+ ctx : context .Background (),
113
116
sc : sct .sc ,
114
117
commandType : uploadCommand ,
115
118
srcFiles : make ([]string , 0 ),
@@ -156,6 +159,7 @@ func TestUnitProcessFileCompressionType(t *testing.T) {
156
159
func TestParseCommandWithInvalidStageLocation (t * testing.T ) {
157
160
runSnowflakeConnTest (t , func (sct * SCTest ) {
158
161
sfa := & snowflakeFileTransferAgent {
162
+ ctx : context .Background (),
159
163
sc : sct .sc ,
160
164
commandType : uploadCommand ,
161
165
srcFiles : make ([]string , 0 ),
@@ -190,6 +194,7 @@ func TestParseCommandEncryptionMaterialMismatchError(t *testing.T) {
190
194
}
191
195
192
196
sfa := & snowflakeFileTransferAgent {
197
+ ctx : context .Background (),
193
198
sc : sct .sc ,
194
199
commandType : uploadCommand ,
195
200
srcFiles : make ([]string , 0 ),
@@ -226,6 +231,7 @@ func TestParseCommandInvalidStorageClientException(t *testing.T) {
226
231
}
227
232
228
233
sfa := & snowflakeFileTransferAgent {
234
+ ctx : context .Background (),
229
235
sc : sct .sc ,
230
236
commandType : uploadCommand ,
231
237
srcFiles : make ([]string , 0 ),
@@ -253,6 +259,7 @@ func TestParseCommandInvalidStorageClientException(t *testing.T) {
253
259
func TestInitFileMetadataError (t * testing.T ) {
254
260
runSnowflakeConnTest (t , func (sct * SCTest ) {
255
261
sfa := & snowflakeFileTransferAgent {
262
+ ctx : context .Background (),
256
263
sc : sct .sc ,
257
264
commandType : uploadCommand ,
258
265
srcFiles : []string {"fileDoesNotExist.txt" },
@@ -352,6 +359,7 @@ func TestUpdateMetadataWithPresignedUrl(t *testing.T) {
352
359
353
360
sct .sc .rest .FuncPostQuery = presignedURLMock
354
361
sfa := & snowflakeFileTransferAgent {
362
+ ctx : context .Background (),
355
363
sc : sct .sc ,
356
364
commandType : uploadCommand ,
357
365
command : "put file:///tmp/test_data/data1.txt @~" ,
@@ -400,6 +408,7 @@ func TestUpdateMetadataWithPresignedUrlForDownload(t *testing.T) {
400
408
}
401
409
402
410
sfa := & snowflakeFileTransferAgent {
411
+ ctx : context .Background (),
403
412
sc : sct .sc ,
404
413
commandType : downloadCommand ,
405
414
command : "get @~/data1.txt.gz file:///tmp/testData" ,
@@ -421,6 +430,7 @@ func TestUpdateMetadataWithPresignedUrlForDownload(t *testing.T) {
421
430
func TestUpdateMetadataWithPresignedUrlError (t * testing.T ) {
422
431
runSnowflakeConnTest (t , func (sct * SCTest ) {
423
432
sfa := & snowflakeFileTransferAgent {
433
+ ctx : context .Background (),
424
434
sc : sct .sc ,
425
435
command : "get @~/data1.txt.gz file:///tmp/testData" ,
426
436
stageLocationType : gcsClient ,
@@ -486,6 +496,7 @@ func TestUploadWhenFilesystemReadOnlyError(t *testing.T) {
486
496
}
487
497
488
498
sfa := & snowflakeFileTransferAgent {
499
+ ctx : context .Background (),
489
500
sc : & snowflakeConn {
490
501
cfg : & Config {},
491
502
},
@@ -585,6 +596,7 @@ func TestCustomTmpDirPath(t *testing.T) {
585
596
}
586
597
587
598
sfa := snowflakeFileTransferAgent {
599
+ ctx : context .Background (),
588
600
sc : & snowflakeConn {
589
601
cfg : & Config {
590
602
TmpDirPath : tmpDir ,
@@ -646,6 +658,7 @@ func TestReadonlyTmpDirPathShouldFail(t *testing.T) {
646
658
}
647
659
648
660
sfa := snowflakeFileTransferAgent {
661
+ ctx : context .Background (),
649
662
sc : & snowflakeConn {
650
663
cfg : & Config {
651
664
TmpDirPath : tmpDir ,
@@ -720,6 +733,7 @@ func testUploadDownloadOneFile(t *testing.T, isStream bool) {
720
733
}
721
734
722
735
sfa := snowflakeFileTransferAgent {
736
+ ctx : context .Background (),
723
737
sc : & snowflakeConn {
724
738
cfg : & Config {
725
739
TmpDirPath : tmpDir ,
0 commit comments