Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: ignore asset hashes in integ tests by default #17592

Merged
merged 2 commits into from
Nov 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/@aws-cdk/cdk-integ-tools/bin/cdk-integ-assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { DEFAULT_SYNTH_OPTIONS, IntegrationTests } from '../lib/integ-helpers';

/* eslint-disable no-console */

const IGNORE_ASSETS_PRAGMA = 'pragma:ignore-assets';
const VERIFY_ASSET_HASHES = 'pragma:include-assets-hashes';

async function main() {
const tests = await new IntegrationTests('test').fromCliArgs(); // always assert all tests
Expand All @@ -22,7 +22,8 @@ async function main() {
let expected = await test.readExpected();
let actual = await test.cdkSynthFast(DEFAULT_SYNTH_OPTIONS);

if ((await test.pragmas()).includes(IGNORE_ASSETS_PRAGMA)) {
// We will always ignore asset hashes, unless specifically requested not to
if (!(await test.pragmas()).includes(VERIFY_ASSET_HASHES)) {
expected = canonicalizeTemplate(expected);
actual = canonicalizeTemplate(actual);
}
Expand Down