feat(tests): introduce real test suite (Vitest + Bats + pytest) — closes #88#163
Open
mvillmow wants to merge 3 commits into
Open
feat(tests): introduce real test suite (Vitest + Bats + pytest) — closes #88#163mvillmow wants to merge 3 commits into
mvillmow wants to merge 3 commits into
Conversation
#88 Establish a real, executing test suite for ProjectProteus by introducing Vitest for the Dagger TypeScript module, Bats for the shell scripts, and pytest for pipeline-config integration tests. Wire all three into CI via SHA-pinned GitHub Actions. - Add dagger/src/index.test.ts with 5 Vitest tests (fully typed, no `any`) - Add dagger/vitest.config.mts for ES-module Vitest config - Update dagger/package.json with exact-pinned vitest@3.0.5 - Add tests/shell/{promote-image,dispatch-apply,check-symlinks}.bats - Add tests/shell/stubs/{skopeo,curl} with sealed PATH isolation - Add tests/integration/test_pipeline_configs.py with #82 xfail(strict=True) - Update pixi.toml to include bats-core and pytest dependencies - Add justfile recipes: test-unit, test-shell, test-integration, test-all - Replace _required.yml unit-tests/integration-tests jobs with real runners - Add shell-tests CI job for Bats tests - Update CLAUDE.md with testing guidelines Regression seeds for #2 (tag arithmetic), #15 (payload contract), #82 (config consumption), and #91 (publish opt-in) are present and labeled. All tests pass: - 5 Vitest unit tests (index.test.ts) - 10 Bats shell-script tests (3 scripts × 2-4 tests each) - 2 pytest integration tests, 1 xfail(strict=True) for #82 contract Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Review implementation for defects, security gaps, safety hazards, or critical bugs. No issues discovered. Test infrastructure is solid per plan. Two rejected follow-ups (feature enhancements outside scope). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Establish a real, executing test suite for ProjectProteus by introducing Vitest for the Dagger TypeScript module, Bats for the shell scripts, and pytest for pipeline-config integration tests, then wire all three into CI. This closes #88 by replacing the YAML-parse-only "tests" at
_required.yml:107-150with actual behavior assertions and by seeding regression coverage for the three load-bearing defects (#2 tag arithmetic, #15 payload contract, #82 config-not-consumed).Changes
dagger/src/index.test.tswith 5 Vitest tests (fully typed, noany)dagger/vitest.config.mtsfor ES-module Vitest configdagger/package.jsonwith exact-pinnedvitest@3.0.5tests/shell/{promote-image,dispatch-apply,check-symlinks}.batstests/shell/stubs/{skopeo,curl}with sealed PATH isolationtests/integration/test_pipeline_configs.pywith#82xfail(strict=True)pixi.tomlto includebats-coreandpytestdependenciestest-unit,test-shell,test-integration,test-all_required.ymlunit-tests/integration-tests jobs with real runnersshell-testsCI job for Bats testsCLAUDE.mdwith testing guidelinesRegression Seeds
dagger/src/index.test.tsfor correct tag refstests/shell/dispatch-apply.batsfor client_payload.hosttests/integration/test_pipeline_configs.pypins the contractdagger/src/index.test.tsverifies opt-in behaviorVerification
All tests pass locally:
Run all tests with:
just test-allCloses #88