Skip to content

Commit f783af0

Browse files
committed
servicecatalog: fix unit tests - in v2, Names.uniqueId(this) produces a different id
1 parent 467bbca commit f783af0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

packages/@aws-cdk/aws-servicecatalog/test/product.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ describe('Product', () => {
216216
const assembly = app.synth();
217217
expect(assembly.artifacts.length).toEqual(2);
218218
expect(assembly.stacks[0].assets.length).toBe(1);
219-
expect(assembly.stacks[0].assets[0].path).toEqual('ProductStack.product.template.json');
219+
expect(assembly.stacks[0].assets[0].path).toEqual('StackProductStack190B56DE.product.template.json');
220220

221-
const expectedTemplateFileKey = 'MyProductStackHistory.ProductStack.v1.product.template.json';
221+
const expectedTemplateFileKey = 'StackMyProductStackHistory8F05371C.StackProductStack190B56DE.v1.product.template.json';
222222
const snapshotExists = fs.existsSync(path.join(DEFAULT_PRODUCT_STACK_SNAPSHOT_DIRECTORY, expectedTemplateFileKey));
223223
expect(snapshotExists).toBe(true);
224224
}),
@@ -268,9 +268,9 @@ describe('Product', () => {
268268
const assembly = app.synth();
269269
expect(assembly.artifacts.length).toEqual(2);
270270
expect(assembly.stacks[0].assets.length).toBe(1);
271-
expect(assembly.stacks[0].assets[0].path).toEqual('ProductStack.product.template.json');
271+
expect(assembly.stacks[0].assets[0].path).toEqual('StackProductStack190B56DE.product.template.json');
272272

273-
const expectedTemplateFileKey = 'MyProductStackHistory.ProductStack.v1.product.template.json';
273+
const expectedTemplateFileKey = 'StackMyProductStackHistory8F05371C.StackProductStack190B56DE.v1.product.template.json';
274274
const snapshotExists = fs.existsSync(path.join(DEFAULT_PRODUCT_STACK_SNAPSHOT_DIRECTORY, expectedTemplateFileKey));
275275
expect(snapshotExists).toBe(true);
276276
}),
@@ -315,7 +315,7 @@ describe('Product', () => {
315315
productStackHistory.versionFromSnapshot('v3'),
316316
],
317317
});
318-
}).toThrowError('Template MyProductStackHistory.ProductStack.v3.product.template.json cannot be found in product-stack-snapshots');
318+
}).toThrowError('Template StackMyProductStackHistory8F05371C.StackProductStack190B56DE.v3.product.template.json cannot be found in product-stack-snapshots');
319319
}),
320320

321321
test('product test from multiple sources', () => {

0 commit comments

Comments
 (0)