mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
Fixed uploadArtifacts tests
This commit is contained in:
parent
7f0e30b631
commit
fc3f0b879a
@ -19,7 +19,7 @@ describe('uploadArtifacts', () => {
|
||||
beforeEach(() => {
|
||||
serverless = new Serverless();
|
||||
serverless.config.servicePath = 'foo';
|
||||
serverless.setProvider('aws', new AwsProvider(serverless));
|
||||
serverless.setProvider('aws', new AwsProvider(serverless, {}));
|
||||
const options = {
|
||||
stage: 'dev',
|
||||
region: 'us-east-1',
|
||||
@ -77,7 +77,18 @@ describe('uploadArtifacts', () => {
|
||||
});
|
||||
|
||||
describe('#enableBucketAcceleration()', () => {
|
||||
it('should enable the S3 bucket transfer acceleration', () => {
|
||||
it('should NOT enable the S3 bucket transfer acceleration by default', () => {
|
||||
const putBucketAccelerateConfigurationStub = sinon
|
||||
.stub(awsDeploy.provider, 'request').resolves();
|
||||
|
||||
return awsDeploy.enableBucketAcceleration().then(() => {
|
||||
expect(putBucketAccelerateConfigurationStub.called).to.equal(false);
|
||||
awsDeploy.provider.request.restore();
|
||||
});
|
||||
});
|
||||
|
||||
it('should enable the S3 bucket transfer acceleration, when enabled', () => {
|
||||
awsDeploy.provider.options['aws-s3-accelerate'] = true;
|
||||
const putBucketAccelerateConfigurationStub = sinon
|
||||
.stub(awsDeploy.provider, 'request').resolves();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user