@@ -330,3 +330,181 @@ Object {
330
330
" IfMatch" : " etag" ,
331
331
}
332
332
` ;
333
+
334
+ exports [` S3 origins When origin is an S3 bucket URL with path creates distribution 1` ] = `
335
+ Object {
336
+ " DistributionConfig" : Object {
337
+ " Aliases" : Object {
338
+ " Items" : Array [],
339
+ " Quantity" : 0 ,
340
+ },
341
+ " CacheBehaviors" : Object {
342
+ " Items" : Array [],
343
+ " Quantity" : 0 ,
344
+ },
345
+ " CallerReference" : " 1566599541192" ,
346
+ " Comment" : " " ,
347
+ " DefaultCacheBehavior" : Object {
348
+ " AllowedMethods" : Object {
349
+ " CachedMethods" : Object {
350
+ " Items" : Array [
351
+ " HEAD" ,
352
+ " GET" ,
353
+ ],
354
+ " Quantity" : 2 ,
355
+ },
356
+ " Items" : Array [
357
+ " HEAD" ,
358
+ " GET" ,
359
+ ],
360
+ " Quantity" : 2 ,
361
+ },
362
+ " Compress" : false ,
363
+ " DefaultTTL" : 86400 ,
364
+ " FieldLevelEncryptionId" : " " ,
365
+ " ForwardedValues" : Object {
366
+ " Cookies" : Object {
367
+ " Forward" : " none" ,
368
+ },
369
+ " Headers" : Object {
370
+ " Items" : Array [],
371
+ " Quantity" : 0 ,
372
+ },
373
+ " QueryString" : false ,
374
+ " QueryStringCacheKeys" : Object {
375
+ " Items" : Array [],
376
+ " Quantity" : 0 ,
377
+ },
378
+ },
379
+ " LambdaFunctionAssociations" : Object {
380
+ " Items" : Array [],
381
+ " Quantity" : 0 ,
382
+ },
383
+ " MaxTTL" : 31536000 ,
384
+ " MinTTL" : 0 ,
385
+ " SmoothStreaming" : false ,
386
+ " TargetOriginId" : " mybucket/static" ,
387
+ " TrustedSigners" : Object {
388
+ " Enabled" : false ,
389
+ " Items" : Array [],
390
+ " Quantity" : 0 ,
391
+ },
392
+ " ViewerProtocolPolicy" : " redirect-to-https" ,
393
+ },
394
+ " Enabled" : true ,
395
+ " HttpVersion" : " http2" ,
396
+ " Origins" : Object {
397
+ " Items" : Array [
398
+ Object {
399
+ " CustomHeaders" : Object {
400
+ " Items" : Array [],
401
+ " Quantity" : 0 ,
402
+ },
403
+ " DomainName" : " mybucket.s3.amazonaws.com" ,
404
+ " Id" : " mybucket/static" ,
405
+ " OriginPath" : " /static" ,
406
+ " S3OriginConfig" : Object {
407
+ " OriginAccessIdentity" : " " ,
408
+ },
409
+ },
410
+ ],
411
+ " Quantity" : 1 ,
412
+ },
413
+ " PriceClass" : " PriceClass_All" ,
414
+ },
415
+ }
416
+ ` ;
417
+
418
+ exports [` S3 origins When origin is an S3 website URL creates custom origin not s3 origin distribution 1` ] = `
419
+ Object {
420
+ " DistributionConfig" : Object {
421
+ " Aliases" : Object {
422
+ " Items" : Array [],
423
+ " Quantity" : 0 ,
424
+ },
425
+ " CacheBehaviors" : Object {
426
+ " Items" : Array [],
427
+ " Quantity" : 0 ,
428
+ },
429
+ " CallerReference" : " 1566599541192" ,
430
+ " Comment" : " " ,
431
+ " DefaultCacheBehavior" : Object {
432
+ " AllowedMethods" : Object {
433
+ " CachedMethods" : Object {
434
+ " Items" : Array [
435
+ " HEAD" ,
436
+ " GET" ,
437
+ ],
438
+ " Quantity" : 2 ,
439
+ },
440
+ " Items" : Array [
441
+ " HEAD" ,
442
+ " GET" ,
443
+ ],
444
+ " Quantity" : 2 ,
445
+ },
446
+ " Compress" : false ,
447
+ " DefaultTTL" : 86400 ,
448
+ " FieldLevelEncryptionId" : " " ,
449
+ " ForwardedValues" : Object {
450
+ " Cookies" : Object {
451
+ " Forward" : " none" ,
452
+ },
453
+ " Headers" : Object {
454
+ " Items" : Array [],
455
+ " Quantity" : 0 ,
456
+ },
457
+ " QueryString" : false ,
458
+ " QueryStringCacheKeys" : Object {
459
+ " Items" : Array [],
460
+ " Quantity" : 0 ,
461
+ },
462
+ },
463
+ " LambdaFunctionAssociations" : Object {
464
+ " Items" : Array [],
465
+ " Quantity" : 0 ,
466
+ },
467
+ " MaxTTL" : 31536000 ,
468
+ " MinTTL" : 0 ,
469
+ " SmoothStreaming" : false ,
470
+ " TargetOriginId" : " mybucket.s3-website.amazonaws.com" ,
471
+ " TrustedSigners" : Object {
472
+ " Enabled" : false ,
473
+ " Items" : Array [],
474
+ " Quantity" : 0 ,
475
+ },
476
+ " ViewerProtocolPolicy" : " redirect-to-https" ,
477
+ },
478
+ " Enabled" : true ,
479
+ " HttpVersion" : " http2" ,
480
+ " Origins" : Object {
481
+ " Items" : Array [
482
+ Object {
483
+ " CustomHeaders" : Object {
484
+ " Items" : Array [],
485
+ " Quantity" : 0 ,
486
+ },
487
+ " CustomOriginConfig" : Object {
488
+ " HTTPPort" : 80 ,
489
+ " HTTPSPort" : 443 ,
490
+ " OriginKeepaliveTimeout" : 5 ,
491
+ " OriginProtocolPolicy" : " https-only" ,
492
+ " OriginReadTimeout" : 30 ,
493
+ " OriginSslProtocols" : Object {
494
+ " Items" : Array [
495
+ " TLSv1.2" ,
496
+ ],
497
+ " Quantity" : 1 ,
498
+ },
499
+ },
500
+ " DomainName" : " mybucket.s3-website.amazonaws.com" ,
501
+ " Id" : " mybucket.s3-website.amazonaws.com" ,
502
+ " OriginPath" : " " ,
503
+ },
504
+ ],
505
+ " Quantity" : 1 ,
506
+ },
507
+ " PriceClass" : " PriceClass_All" ,
508
+ },
509
+ }
510
+ ` ;
0 commit comments