|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
|
2 | 2 |
|
3 |
| -exports[`Input origin as an S3 bucket url creates distribution with S3 origin 1`] = ` |
| 3 | +exports[`S3 origins When origin is an S3 URL only accessible via CloudFront creates distribution 1`] = ` |
4 | 4 | Object {
|
5 | 5 | "DistributionConfig": Object {
|
6 | 6 | "Aliases": Object {
|
7 | 7 | "Items": Array [],
|
8 | 8 | "Quantity": 0,
|
9 | 9 | },
|
| 10 | + "CacheBehaviors": Object { |
| 11 | + "Items": Array [], |
| 12 | + "Quantity": 0, |
| 13 | + }, |
| 14 | + "CallerReference": "1566599541192", |
| 15 | + "Comment": "", |
| 16 | + "DefaultCacheBehavior": Object { |
| 17 | + "AllowedMethods": Object { |
| 18 | + "CachedMethods": Object { |
| 19 | + "Items": Array [ |
| 20 | + "HEAD", |
| 21 | + "GET", |
| 22 | + ], |
| 23 | + "Quantity": 2, |
| 24 | + }, |
| 25 | + "Items": Array [ |
| 26 | + "HEAD", |
| 27 | + "GET", |
| 28 | + ], |
| 29 | + "Quantity": 2, |
| 30 | + }, |
| 31 | + "Compress": false, |
| 32 | + "DefaultTTL": 86400, |
| 33 | + "FieldLevelEncryptionId": "", |
| 34 | + "ForwardedValues": Object { |
| 35 | + "Cookies": Object { |
| 36 | + "Forward": "none", |
| 37 | + }, |
| 38 | + "Headers": Object { |
| 39 | + "Items": Array [], |
| 40 | + "Quantity": 0, |
| 41 | + }, |
| 42 | + "QueryString": false, |
| 43 | + "QueryStringCacheKeys": Object { |
| 44 | + "Items": Array [], |
| 45 | + "Quantity": 0, |
| 46 | + }, |
| 47 | + }, |
| 48 | + "LambdaFunctionAssociations": Object { |
| 49 | + "Items": Array [], |
| 50 | + "Quantity": 0, |
| 51 | + }, |
| 52 | + "MaxTTL": 31536000, |
| 53 | + "MinTTL": 0, |
| 54 | + "SmoothStreaming": false, |
| 55 | + "TargetOriginId": "mybucket", |
| 56 | + "TrustedSigners": Object { |
| 57 | + "Enabled": false, |
| 58 | + "Items": Array [], |
| 59 | + "Quantity": 0, |
| 60 | + }, |
| 61 | + "ViewerProtocolPolicy": "redirect-to-https", |
| 62 | + }, |
| 63 | + "Enabled": true, |
| 64 | + "HttpVersion": "http2", |
| 65 | + "Origins": Object { |
| 66 | + "Items": Array [ |
| 67 | + Object { |
| 68 | + "CustomHeaders": Object { |
| 69 | + "Items": Array [], |
| 70 | + "Quantity": 0, |
| 71 | + }, |
| 72 | + "DomainName": "mybucket.s3.amazonaws.com", |
| 73 | + "Id": "mybucket", |
| 74 | + "OriginPath": "", |
| 75 | + "S3OriginConfig": Object { |
| 76 | + "OriginAccessIdentity": "origin-access-identity/cloudfront/access-identity-xyz", |
| 77 | + }, |
| 78 | + }, |
| 79 | + ], |
| 80 | + "Quantity": 1, |
| 81 | + }, |
| 82 | + "PriceClass": "PriceClass_All", |
| 83 | + }, |
| 84 | +} |
| 85 | +`; |
| 86 | + |
| 87 | +exports[`S3 origins When origin is an S3 URL only accessible via CloudFront updates distribution 1`] = ` |
| 88 | +Object { |
| 89 | + "DistributionConfig": Object { |
| 90 | + "Aliases": Object { |
| 91 | + "Items": Array [], |
| 92 | + "Quantity": 0, |
| 93 | + }, |
| 94 | + "CacheBehaviors": Object { |
| 95 | + "Items": Array [], |
| 96 | + "Quantity": 0, |
| 97 | + }, |
| 98 | + "CallerReference": "1566599541192", |
| 99 | + "Comment": "", |
| 100 | + "DefaultCacheBehavior": Object { |
| 101 | + "AllowedMethods": Object { |
| 102 | + "CachedMethods": Object { |
| 103 | + "Items": Array [ |
| 104 | + "HEAD", |
| 105 | + "GET", |
| 106 | + ], |
| 107 | + "Quantity": 2, |
| 108 | + }, |
| 109 | + "Items": Array [ |
| 110 | + "HEAD", |
| 111 | + "GET", |
| 112 | + ], |
| 113 | + "Quantity": 2, |
| 114 | + }, |
| 115 | + "Compress": false, |
| 116 | + "DefaultTTL": 86400, |
| 117 | + "FieldLevelEncryptionId": "", |
| 118 | + "ForwardedValues": Object { |
| 119 | + "Cookies": Object { |
| 120 | + "Forward": "none", |
| 121 | + }, |
| 122 | + "Headers": Object { |
| 123 | + "Items": Array [], |
| 124 | + "Quantity": 0, |
| 125 | + }, |
| 126 | + "QueryString": false, |
| 127 | + "QueryStringCacheKeys": Object { |
| 128 | + "Items": Array [], |
| 129 | + "Quantity": 0, |
| 130 | + }, |
| 131 | + }, |
| 132 | + "LambdaFunctionAssociations": Object { |
| 133 | + "Items": Array [], |
| 134 | + "Quantity": 0, |
| 135 | + }, |
| 136 | + "MaxTTL": 31536000, |
| 137 | + "MinTTL": 0, |
| 138 | + "SmoothStreaming": false, |
| 139 | + "TargetOriginId": "mybucket", |
| 140 | + "TrustedSigners": Object { |
| 141 | + "Enabled": false, |
| 142 | + "Items": Array [], |
| 143 | + "Quantity": 0, |
| 144 | + }, |
| 145 | + "ViewerProtocolPolicy": "redirect-to-https", |
| 146 | + }, |
| 147 | + "Enabled": true, |
| 148 | + "HttpVersion": "http2", |
| 149 | + "Origins": Object { |
| 150 | + "Items": Array [ |
| 151 | + Object { |
| 152 | + "CustomHeaders": Object { |
| 153 | + "Items": Array [], |
| 154 | + "Quantity": 0, |
| 155 | + }, |
| 156 | + "DomainName": "mybucket.s3.amazonaws.com", |
| 157 | + "Id": "mybucket", |
| 158 | + "OriginPath": "", |
| 159 | + "S3OriginConfig": Object { |
| 160 | + "OriginAccessIdentity": "origin-access-identity/cloudfront/access-identity-xyz", |
| 161 | + }, |
| 162 | + }, |
| 163 | + ], |
| 164 | + "Quantity": 1, |
| 165 | + }, |
| 166 | + "PriceClass": "PriceClass_All", |
| 167 | + }, |
| 168 | +} |
| 169 | +`; |
| 170 | + |
| 171 | +exports[`S3 origins When origin is an S3 bucket URL creates distribution 1`] = ` |
| 172 | +Object { |
| 173 | + "DistributionConfig": Object { |
| 174 | + "Aliases": Object { |
| 175 | + "Items": Array [], |
| 176 | + "Quantity": 0, |
| 177 | + }, |
| 178 | + "CacheBehaviors": Object { |
| 179 | + "Items": Array [], |
| 180 | + "Quantity": 0, |
| 181 | + }, |
10 | 182 | "CallerReference": "1566599541192",
|
11 | 183 | "Comment": "",
|
12 | 184 | "DefaultCacheBehavior": Object {
|
@@ -80,9 +252,13 @@ Object {
|
80 | 252 | }
|
81 | 253 | `;
|
82 | 254 |
|
83 |
| -exports[`Input origin as an S3 bucket url updates distribution 1`] = ` |
| 255 | +exports[`S3 origins When origin is an S3 bucket URL updates distribution 1`] = ` |
84 | 256 | Object {
|
85 | 257 | "DistributionConfig": Object {
|
| 258 | + "CacheBehaviors": Object { |
| 259 | + "Items": Array [], |
| 260 | + "Quantity": 0, |
| 261 | + }, |
86 | 262 | "DefaultCacheBehavior": Object {
|
87 | 263 | "AllowedMethods": Object {
|
88 | 264 | "CachedMethods": Object {
|
|
0 commit comments