Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions cdk/lib/provision-runner-buildspec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ export function renderProvisionRunnerBuildCommands(): string {
' test "$BODY_RELEASE_VERSION" = "$body_tag" || fail "lesser-body release manifest version mismatch: $BODY_RELEASE_VERSION"',
' BODY_DEPLOY_MANIFEST=$(jq -r \'.deploy.manifest_path // empty\' "$body_release_dir/lesser-body-release.json")',
' test "$BODY_DEPLOY_MANIFEST" = "lesser-body-deploy.json" || fail "unexpected lesser-body deploy manifest path: $BODY_DEPLOY_MANIFEST"',
' BODY_SOURCE_CHECKOUT_REQUIRED=$(jq -r \'.deploy.source_checkout_required // empty\' "$body_release_dir/lesser-body-release.json")',
' BODY_SOURCE_CHECKOUT_REQUIRED=$(jq -r \'if .deploy.source_checkout_required == false then "false" elif .deploy.source_checkout_required == true then "true" else empty end\' "$body_release_dir/lesser-body-release.json")',
' test "$BODY_SOURCE_CHECKOUT_REQUIRED" = "false" || fail "lesser-body release unexpectedly requires a source checkout"',
' BODY_NPM_INSTALL_REQUIRED=$(jq -r \'.deploy.npm_install_required // empty\' "$body_release_dir/lesser-body-release.json")',
' BODY_NPM_INSTALL_REQUIRED=$(jq -r \'if .deploy.npm_install_required == false then "false" elif .deploy.npm_install_required == true then "true" else empty end\' "$body_release_dir/lesser-body-release.json")',
' test "$BODY_NPM_INSTALL_REQUIRED" = "false" || fail "lesser-body release unexpectedly requires npm install"',
' BODY_TEMPLATE_PATH=$(jq -r ".artifacts.deploy_templates[$body_stage].path // empty" "$body_release_dir/lesser-body-release.json")',
' test "$BODY_TEMPLATE_PATH" = "lesser-body-managed-$body_stage.template.json" || fail "unexpected lesser-body template path for stage $body_stage: $BODY_TEMPLATE_PATH"',
Expand Down
13 changes: 13 additions & 0 deletions cdk/test/provision-runner-buildspec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,16 @@ test('runner emits explicit asset-contract failure messages', () => {
assert.match(buildCommands, /lesser-body release unexpectedly requires a source checkout/);
assert.match(buildCommands, /unexpected lesser-body deploy manifest path/);
});

test('RUN_MODE=lesser-body handles boolean false manifest flags without jq fallback drift', () => {
assert.doesNotMatch(buildCommands, /\.deploy\.source_checkout_required \/\/ empty/);
assert.doesNotMatch(buildCommands, /\.deploy\.npm_install_required \/\/ empty/);
assert.match(
buildCommands,
/if \.deploy\.source_checkout_required == false then "false" elif \.deploy\.source_checkout_required == true then "true" else empty end/,
);
assert.match(
buildCommands,
/if \.deploy\.npm_install_required == false then "false" elif \.deploy\.npm_install_required == true then "true" else empty end/,
);
});
Loading