Skip to content

feat(tests): introduce real test suite (Vitest + Bats + pytest) — closes #88#163

Open
mvillmow wants to merge 3 commits into
mainfrom
88-auto-impl
Open

feat(tests): introduce real test suite (Vitest + Bats + pytest) — closes #88#163
mvillmow wants to merge 3 commits into
mainfrom
88-auto-impl

Conversation

@mvillmow

@mvillmow mvillmow commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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-150 with 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

  • 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

Verification

All tests pass locally:

Run all tests with: just test-all

Closes #88

 #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>
mvillmow and others added 2 commits June 3, 2026 18:56
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CRITICAL] §5: Zero actual test files exist in the repository

1 participant