We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a58867 commit 3317f8bCopy full SHA for 3317f8b
1 file changed
packages/@aws-cdk/core/test/test.assets.ts
@@ -46,7 +46,29 @@ export = {
46
});
47
48
test.done();
49
+ },
50
+
51
+ 'addFileAsset correctly sets object urls'(test: Test) {
52
+ // GIVEN
53
+ const stack = new Stack();
54
55
+ // WHEN
56
+ const assetLocation = stack.addFileAsset({
57
+ fileName: 'file-name',
58
+ packaging: FileAssetPackaging.ZIP_DIRECTORY,
59
+ sourceHash: 'source-hash',
60
+ });
61
62
+ // THEN
63
+ const expectedS3UrlPrefix = 's3://';
64
+ const expectedHttpUrlPrefix = `https://s3.${stack.region}.${stack.urlSuffix}/`;
65
66
+ test.equal(
67
+ assetLocation.s3ObjectUrl.replace(expectedS3UrlPrefix, ''),
68
+ assetLocation.httpUrl.replace(expectedHttpUrlPrefix, ''),
69
+ );
70
71
+ test.done();
72
},
73
74
'addDockerImageAsset correctly sets metadata'(test: Test) {
0 commit comments