File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,7 @@ describe('aws-request', () => {
3131 let gcsSinkBucket ;
3232
3333 before ( async ( ) => {
34- assert (
35- process . env . AWS_ACCESS_KEY_ID && process . env . AWS_SECRET_ACCESS_KEY ,
36- 'environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are required'
37- ) ;
34+ testBucketManager . setupS3 ( ) ;
3835
3936 projectId = await testBucketManager . getProjectId ( ) ;
4037 awsSourceBucket = await testBucketManager . generateS3Bucket ( ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ const uuid = require('uuid');
2727class BucketManager {
2828 constructor ( ) {
2929 this . client = new StorageTransferServiceClient ( ) ;
30- this . s3 = new AWS . S3 ( { apiVersion : '2006-03-01' } ) ;
3130 this . storage = new Storage ( ) ;
3231
3332 /**
@@ -45,6 +44,10 @@ class BucketManager {
4544 this . s3Buckets = [ ] ;
4645 }
4746
47+ setupS3 ( options = { } ) {
48+ this . s3 = new AWS . S3 ( { apiVersion : '2006-03-01' , ...options } ) ;
49+ }
50+
4851 async getProjectId ( ) {
4952 if ( ! this . _cachedProjectId ) {
5053 this . _cachedProjectId = await this . storage . getProjectId ( ) ;
You can’t perform that action at this time.
0 commit comments