File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,7 @@ describe('aws-request', () => {
31
31
let gcsSinkBucket ;
32
32
33
33
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 ( ) ;
38
35
39
36
projectId = await testBucketManager . getProjectId ( ) ;
40
37
awsSourceBucket = await testBucketManager . generateS3Bucket ( ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ const uuid = require('uuid');
27
27
class BucketManager {
28
28
constructor ( ) {
29
29
this . client = new StorageTransferServiceClient ( ) ;
30
- this . s3 = new AWS . S3 ( { apiVersion : '2006-03-01' } ) ;
31
30
this . storage = new Storage ( ) ;
32
31
33
32
/**
@@ -45,6 +44,10 @@ class BucketManager {
45
44
this . s3Buckets = [ ] ;
46
45
}
47
46
47
+ setupS3 ( options = { } ) {
48
+ this . s3 = new AWS . S3 ( { apiVersion : '2006-03-01' , ...options } ) ;
49
+ }
50
+
48
51
async getProjectId ( ) {
49
52
if ( ! this . _cachedProjectId ) {
50
53
this . _cachedProjectId = await this . storage . getProjectId ( ) ;
You can’t perform that action at this time.
0 commit comments