-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/assertRelated to the @aws-cdk/assert packageRelated to the @aws-cdk/assert packagebugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Description
We utilize snapshots for a large amount of regression testing like this:
const app = new cdk.App({
context: {
'@aws-cdk/core:newStyleStackSynthesis': 'true',
},
outdir: './cdk.out',
stackTraces: false,
});
// WHEN
const stack = createStack(...);
// THEN
expect(SynthUtils.toCloudFormation(stack)).toMatchSnapshot();Reproduction Steps
See previous code.
What did you expect to happen?
Should so that regression testing using snapshots is possible.
What actually happened?
It seems that 1.101.0 has changed somehow and generates a new directory reference with every build which causes diffs:
- Snapshot - 2
+ Received + 2
@@ -249,11 +249,11 @@
"libraries": Object {},
},
"version": "9.0.0",
},
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
- "file": "/Users/user/repo/cdk.out/Stack.assets.json",
+ "file": "/codebuild/output/src976733808/src/git-codecommit.eu-central-1.amazonaws.com/v1/repos/repo/cdk.out/Stack.assets.json",
"id": "Stack.assets",
"manifest": Object {
"properties": Object {
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"file": "Stack.assets.json",
@@ -270,11 +270,11 @@
AssetManifestArtifact {
"_dependencyIDs": Array [],
"_deps": Array [],
"assembly": [Circular],
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
- "file": "/Users/user/repo/cdk.out/Stack.assets.json",
+ "file": "/codebuild/output/src976733808/src/git-codecommit.eu-central-1.amazonaws.com/v1/repos/repo/cdk.out/Stack.assets.json",
"id": "Stack.assets",
"manifest": Object {
"properties": Object {
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"file": "Stack.assets.json",
63 |
--Environment
- CDK CLI Version :
- Framework Version: 1.101.0
- Node.js Version:
- OS : macOS
- Language (Version): TypeScript 4
Other
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/assertRelated to the @aws-cdk/assert packageRelated to the @aws-cdk/assert packagebugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 7 days.Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.