Skip to content

Commit

Permalink
cleanup + eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
rmgraham committed Jun 5, 2020
1 parent abbd279 commit 19bdb11
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions app/s3/s3Client.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const S3Client = rewire('./s3Client');
AwsS3Mock.config.basePath = '/tmp/buckets';
S3Client.__set__({
AWS: AwsS3Mock,
bucketExists: ()=>{return true}, //mock library doesnt have this function
bucketExists: ()=>{return true;}, //mock library doesnt have this function
});

describe('s3', () => {
Expand Down Expand Up @@ -53,16 +53,15 @@ describe('s3', () => {
var iv = Buffer.from(ivText, 'base64');

await s3Client.createBucket(bucketName);
s3Client.bucketExists = ()=>{return true};
s3Client.bucketExists = ()=>{return true;};

//console.log(11111, bucketName, path, inContent, encryptionKey, ivText, iv);

var out = await s3Client.encryptAndUploadFile(bucketName, path, fileStream, encryptionKey, iv);

//console.log('uploaded', out);
// encrypts and uploads
await s3Client.encryptAndUploadFile(bucketName, path, fileStream, encryptionKey, iv);

// downloads and decrypts
var outContent = await s3Client.getAndDecryptFile(bucketName, path, encryptionKey, iv);

// makes sure we got the right content back
assert.equal(inContent, outContent);
});
});
Expand Down

0 comments on commit 19bdb11

Please sign in to comment.