iinteg-tests-alpha: can't have assertions make a deploy fail #30513
Labels
@aws-cdk/assertions
Related to the @aws-cdk/assertv2 package
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the bug
I want to have Integration tests run both as standalone tests using integ-runner and as part of the regular deployment. Right now, I'm able to do this, but can't get the deployments to fail when tests fail.
Expected Behavior
Failed integration tests that are part of a regular deployment should make the deployment fail.
Current Behavior
Deployment shows the failed test output, but succeeds anyways.
Reproduction Steps
Given the following stack:
the following integration test file
and the assertions defined like this:
If I run the tests with integ-runner, they fail as expected. But if I do a cdk deploy, the test fails but the deployment succeeds
Possible Solution
I find a workaround to make the deployment fail as I expect it to. if I add the following to the end of the createAssertions function
Then the deployment fails when the tests fail
Additional Information/Context
Ideally, I think there should be a way to add the
failDeployment: true
to the regular expect instead of having to check for the assertion value in a separate assertionCDK CLI Version
2.143.1
Framework Version
No response
Node.js Version
20.12.2
OS
MacOs
Language
TypeScript
Language Version
5.4.5
Other information
No response
The text was updated successfully, but these errors were encountered: