docs(tests): npm/PowerShell wrappers, remove legacy shells (#562 4/4)#574
docs(tests): npm/PowerShell wrappers, remove legacy shells (#562 4/4)#574WilliamBerryiii wants to merge 1 commit into
Conversation
- blueprints/full-single-node-cluster/README.md: update Testing section and 'When modifying' workflow to reference 'npm run go-test' and 'npm run go-test:deploy:*' instead of run-contract-tests.sh/run-deployment-tests.sh - blueprints/full-single-node-cluster/tests/README.md: rewrite Quick Start, Setup, Running Contract Tests, Running Deployment Tests, Automation Entry Points, and end-to-end example sections to use npm scripts; drop helper-script bullets and the 'jq' helper-script dependency - blueprints/full-single-node-cluster/tests/deploy_bicep_test.go: remove '(set in run-deployment-tests.sh)' comment now that env vars are set directly - blueprints/full-single-node-cluster/tests/deploy_terraform_test.go: same comment cleanup for the Terraform deployment test - blueprints/full-single-node-cluster/tests/run-contract-tests.sh: removed (superseded by 'npm run go-test') - blueprints/full-single-node-cluster/tests/run-deployment-tests.sh: removed (superseded by 'npm run go-test:deploy:*') - docs/contributing/testing-validation.md: switch Running Contract Tests, Running Deployment Tests, and example test-directory layout to npm scripts; drop 'helper scripts' bullet from the suite-overview and new-blueprint checklist - docs/getting-started/blueprint-developer.md: update the blueprint test-author checklist and Running Tests examples to point at 'npm run go-test' / 'npm run go-test:deploy:terraform' Closes #570 Relates to #562 🔒 - Generated by Copilot
There was a problem hiding this comment.
The "Environment Variables Reference" section contains an "Auto-Detected Variables" subsection header and lists ARM_SUBSCRIPTION_ID and CUSTOM_LOCATIONS_OID with a fallback of "Script fails if not detected". The shell scripts that performed this auto-detection (run-deployment-tests.sh) are removed in this PR, and the npm deployment scripts (go-test:deploy:*) call go test directly without any env-var detection. This directly contradicts the updated Setup section added by this PR ("Set ARM_SUBSCRIPTION_ID before running deployment tests").
Consider renaming the subsection from "Auto-Detected Variables" to "Required Variables" and updating the Fallback column to reflect that these must now be set manually.
There was a problem hiding this comment.
The "Key Differences: Terraform vs Bicep Tests" table has two cells that still reference the deleted shell scripts: (+) Required (auto-generated by script) for ADMIN_PASSWORD and (+) Required (auto-detected by script) for Custom Locations OID. With run-deployment-tests.sh removed, neither the npm scripts nor the Go tests auto-generate or auto-detect these values.
Suggested update:
ADMIN_PASSWORD:(+) Required (set via ADMIN_PASSWORD env var)CUSTOM_LOCATIONS_OID:(+) Required (set via CUSTOM_LOCATIONS_OID env var)
There was a problem hiding this comment.
Step 6 was changed from a concrete instruction ("Copy and adapt run-contract-tests.sh and run-deployment-tests.sh from the reference implementation") to the vaguer "Add package scripts that run the Go contract and deployment tests for the blueprint." A new blueprint author has no pointer to what scripts to add or how to structure them.
Consider adding a reference to the existing pattern, for example: "Add package scripts (following the go-test:* pattern in package.json) that run the Go contract and deployment tests for the blueprint."
Pull Request
Description
Final PR (4 of 4) in the static Go contract-test rollout stack for #562. Replaces the legacy
run-contract-tests.sh/run-deployment-tests.shBash wrappers with the npm + PowerShell entry points landed in #571 and #572, and updates every doc that referenced the old scripts so contributors land on the supported workflow.Removal of the two shell wrappers is a breaking change for anyone invoking them directly. The replacement is
npm run go-test(contract) andnpm run go-test:deploy:terraform|bicep/npm run go-test:deploy(deployment).Related Issue
Closes #570
Relates to #562
Type of Change
Implementation Details
Blueprint docs
blueprints/full-single-node-cluster/README.md— Testing section now lists "npm Entry Points" instead of "Helper Scripts"; the "When modifying this blueprint" workflow usesnpm run go-testfor contract baselines andnpm run go-test:deploy:<framework>for deployments.blueprints/full-single-node-cluster/tests/README.md— Quick Start, Setup, Running Contract Tests, Running Deployment Tests, Automation Entry Points, and the end-to-end example all use npm scripts;jq(only needed by the shell wrappers) is dropped from recommended dependencies; deployment env-var section now listsARM_SUBSCRIPTION_ID,CUSTOM_LOCATIONS_OID, andADMIN_PASSWORDas required rather than auto-detected.Test code comments
blueprints/full-single-node-cluster/tests/deploy_bicep_test.goanddeploy_terraform_test.go— strip(set in run-deployment-tests.sh)comments now that env vars are set directly by the caller (npm script, PowerShell wrapper, or developer shell).Removed wrappers
blueprints/full-single-node-cluster/tests/run-contract-tests.sh— superseded bynpm run go-test.blueprints/full-single-node-cluster/tests/run-deployment-tests.sh— superseded bynpm run go-test:deploy:terraform|bicep(andnpm run go-test:deployfor both).Repo-wide docs
docs/contributing/testing-validation.md— Contract/Deployment test instructions and the exampleblueprints/{name}/tests/layout drop the.shwrappers and use npm scripts; the new-blueprint checklist asks authors to add "package scripts" rather than helper scripts.docs/getting-started/blueprint-developer.md— blueprint test-author checklist and Running Tests snippets point atnpm run go-testandnpm run go-test:deploy:terraform.Testing Performed
.copilot-tracking/.Validation Steps
grep -rn "run-contract-tests\.sh\|run-deployment-tests\.sh"outside.copilot-tracking/returns zero references after this PR.npm run mdlint-fix— no changes required.npm run lint(composite ofmdlint,cspell,yaml,format-json,docker-lint) — exit 0; only pre-existing baseline warnings unrelated to this stack.Checklist
terraform fmton all Terraform codeterraform validateon all Terraform codeaz bicep formaton all Bicep codeaz bicep buildto validate all Bicep codeSecurity Review
This PR does not touch
SECURITY.md,src/000-cloud/010-security-identity/, ordeploy/.Additional Notes
Stacked on top of #571 (foundation), #572 (detector + PowerShell wrapper), and #573 (CI wiring).
Screenshots (if applicable)
N/A.
🔒 - Generated by Copilot