In the current storage tests the api calls to AWS are not being mocked correctly. This causes most of the storage tests to fail.
Description:
In the storage tests the url being mocked is s3-us-west-2.amazonaws.com:443. It should actually be s3.us-west-2.amazonaws.com:443.
This makes actual buckets to be created and listed. And the other tests fail.
Similar or dependent issues:
54
Additional Data
Operating System: Mac OSX
Stack Trace:
yarn run v1.5.1
$ mocha test/storage/aws-s3.js
AWS S3
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): BucketAlreadyExists: The requested bucketname is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again.
(node:1472) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
1) should create S3 bucket
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError: expected [AccessDenied: Access Denied] to equal 'BucketNotEmpty: The bucket you tried to delete is not empty'
2) should not delete S3 bucket
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): AccessDenied: Access Denied
3) should create multipart upload
✓ should list all buckets (1653ms)
(node:1472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): AccessDenied: Access Denied
4) should upload an arbitary sized buffer, blob, or stream
1 passing (10s)
4 failing
1) AWS S3 should create S3 bucket:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
2) AWS S3 should not delete S3 bucket:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
3) AWS S3 should create multipart upload:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
4) AWS S3 should upload an arbitary sized buffer, blob, or stream:
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
error An unexpected error occurred: "Command failed.
Exit code: 4
Command: sh
Arguments: -c mocha test/storage/aws-s3.js
Directory: /Users/samayjain/Desktop/samay/nodecloud
Output:
".
This is a Bug Report
In the current storage tests the api calls to AWS are not being mocked correctly. This causes most of the storage tests to fail.
Description:
s3-us-west-2.amazonaws.com:443
. It should actually bes3.us-west-2.amazonaws.com:443
.Similar or dependent issues:
54
Additional Data
Stack Trace:
error An unexpected error occurred: "Command failed. Exit code: 4 Command: sh Arguments: -c mocha test/storage/aws-s3.js Directory: /Users/samayjain/Desktop/samay/nodecloud Output: ".