aws/aws-cdk-rfcs

Proposed improvements to cdk-integ

Closed this issue · 1 comments

eladb commented

Consider if this is really needed. At the moment, cdk-integ tests will only compare to an expectation file during build. This allows us to pragmatically scale and write integration tests so long as developers execute them once (and upon every change) and check-in an expectation file.

There are a few missing features:

  • Integration tests currently do not contain any assertions - they mainly "assert" that the stack can be deployed, which is a lot for L2 constructs since L2s mainly reflect the pure semantics of the resource (so if it can be deployed, it's supposed to behave as expected). However, for L3s and in general, the integration testing framework should also allow users to express assertions against the deployed stack. Those assertions should be executed within the context of the stack (i.e. a Lambda function running in the same VPC as the stack), and seamlessly deploy the test code. It should also be easy to run these and debug them. This probably means that this should be implemented only after we have a full solution for aws/aws-cdk#85.
  • It would be nice if integration tests will automatically be executed in the build pipeline, which means that CDK stacks will be deployed, asserted and destructed.
eladb commented

Duplicate #31