-
I use CDK to deploy S3 static website which forwards a CloudFront. I want to use https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-testing.html |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It really depends on how you'd like to design your integration testing. In AWS CDK, we typically use @aws-cdk/integ-tests to compare the synth results with pre-generated snapshots as described here so when you run However, in some cases you probably would like to design a more complicated test case for your CloudFront distribution. For example, to provisioning a CloudFront distribution with S3 static website as its backend and eventually create a custom resource probe like the Pinger to perform HTTP GET against the CloudFront endpoint and validate its response, which is still possible and in fact aws-eks has a similar integ test like this here. And in case you miss it, cdk-http-pinger might be something you will be interested to help you perform HTTP request against the CloudFront endpoint as well. Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
It really depends on how you'd like to design your integration testing.
In AWS CDK, we typically use @aws-cdk/integ-tests to compare the synth results with pre-generated snapshots as described here so when you run
yarn integ
it will first compare the pre-generated snapshots. If it doesn't match,yarn integ
will deploy the stack and re-generate the snapshots for you if the deployment succeeds.However, in some cases you probably would like to design a more complicated test case for your CloudFront distribution. For example, to provisioning a CloudFront distribution with S3 static website as its backend and eventually create a custom resource probe like the Pinger to perform HTTP GET agains…