Skip to content

🪲 [Fix]: TestData keys reach setup and teardown phases#394

Merged
Marius Storhaug (MariusStorhaug) merged 2 commits into
mainfrom
fix/386-testdata-module-local-parity
Jul 16, 2026
Merged

🪲 [Fix]: TestData keys reach setup and teardown phases#394
Marius Storhaug (MariusStorhaug) merged 2 commits into
mainfrom
fix/386-testdata-module-local-parity

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Jul 16, 2026

Copy link
Copy Markdown
Member

TestData values now reach every module-local phase through the same export path. Setup scripts, module tests, and teardown scripts can rely on identical environment variable names for caller-provided secrets and variables, with secret masking preserved.

Fixed: Setup and teardown scripts receive TestData keys

BeforeAll-ModuleLocal, Test-ModuleLocal, and AfterAll-ModuleLocal now all call the same local Expose-TestData action after installing the shared helper module. This keeps TestData parsing, validation, masking, and GITHUB_ENV export behavior identical before each phase runs.

Callers continue to use the existing TestData workflow secret; no interface change is required.

Changed: TestData phase parity is documented

The README now states that the same TestData keys are available in setup, test, and teardown phases, and includes troubleshooting guidance for callers that use secrets: inherit without explicitly creating a TestData JSON payload.

Technical Details

  • Added .github/actions/Expose-TestData/action.yml as the single workflow step wrapper around Import-TestData.
  • Updated BeforeAll-ModuleLocal.yml, Test-ModuleLocal.yml, and AfterAll-ModuleLocal.yml to use the shared action.
  • Added fixture assertions to both workflow test repositories so PSMODULE_TEST_SINGLELINE_SECRET and PSMODULE_TEST_VARIABLE are checked in BeforeAll.ps1, Pester tests, and AfterAll.ps1.
  • Implementation plan progress: core shared export path, parity validation, setup/teardown regression coverage, and README guidance are complete.
  • Local validation: helper test scripts passed; setup/teardown fixture assertions passed for both test repositories; touched workflow files passed actionlint with the repository's known job.workflow_repository/job.workflow_sha context warnings ignored.

@MariusStorhaug Marius Storhaug (MariusStorhaug) added bug Something isn't working Patch labels Jul 16, 2026
@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title Draft: TestData phase parity 🪲 [Fix]: TestData keys reach setup and teardown phases Jul 16, 2026
@MariusStorhaug
Marius Storhaug (MariusStorhaug) requested a review from a team July 16, 2026 18:26
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

Super-linter summary

Language Validation result
CHECKOV Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
MARKDOWN Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
YAML Pass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review July 16, 2026 20:30
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit 8b1a261 into main Jul 16, 2026
70 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the fix/386-testdata-module-local-parity branch July 16, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix TestData secret/variable propagation parity across BeforeAll, Test, and AfterAll module-local phases

1 participant