Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
zachwhaley committed May 3, 2021
1 parent 24d8949 commit 9ab7937
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions test/unit/lib/plugins/aws/utils/parse-s3-uri.test.js
Expand Up @@ -24,15 +24,19 @@ describe('test/unit/lib/plugins/aws/utils/parse-s3-uri.test.js', () => {
Bucket: 'test-bucket',
Key: 'path/to/artifact.zip',
};
const actual = parseS3URI('https://s3.us-west-1.amazonaws.com/test-bucket/path/to/artifact.zip');
const actual = parseS3URI(
'https://s3.us-west-1.amazonaws.com/test-bucket/path/to/artifact.zip'
);
expect(actual).to.deep.equal(expected);
});
it('should parse another old style S3 URL with region', () => {
const expected = {
Bucket: 'test-bucket',
Key: 'path/to/artifact.zip',
};
const actual = parseS3URI('https://s3-us-west-1.amazonaws.com/test-bucket/path/to/artifact.zip');
const actual = parseS3URI(
'https://s3-us-west-1.amazonaws.com/test-bucket/path/to/artifact.zip'
);
expect(actual).to.deep.equal(expected);
});
it('should parse a new style S3 URL', () => {
Expand All @@ -48,15 +52,19 @@ describe('test/unit/lib/plugins/aws/utils/parse-s3-uri.test.js', () => {
Bucket: 'test-bucket',
Key: 'path/to/artifact.zip',
};
const actual = parseS3URI('https://test-bucket.s3.eu-west-1.amazonaws.com/path/to/artifact.zip');
const actual = parseS3URI(
'https://test-bucket.s3.eu-west-1.amazonaws.com/path/to/artifact.zip'
);
expect(actual).to.deep.equal(expected);
});
it('should parse another new style S3 URL with region', () => {
const expected = {
Bucket: 'test-bucket',
Key: 'path/to/artifact.zip',
};
const actual = parseS3URI('https://test-bucket.s3-eu-west-1.amazonaws.com/path/to/artifact.zip');
const actual = parseS3URI(
'https://test-bucket.s3-eu-west-1.amazonaws.com/path/to/artifact.zip'
);
expect(actual).to.deep.equal(expected);
});
it('should reject non S3 URLs', () => {
Expand Down

0 comments on commit 9ab7937

Please sign in to comment.