[TESTING] Expand test_bezalel.py with comprehensive test coverage #6

Open
opened 2026-04-04 16:02:15 +00:00 by bezalel · 0 comments
Owner

Summary

The current test_bezalel.py at /root/wizards/bezalel/test_bezalel.py needs to be expanded into a proper test suite with broad coverage of Bezalel's core capabilities.

Motivation

An artisan wizard must know when something is broken before a user reports it. Comprehensive tests are the foundation of self-awareness and reliability.

Acceptance Criteria

  • Test suite covers at least these categories:
    • Profile validation: profile.yaml is valid YAML, has all required fields, paths exist
    • Script integrity: all scripts in scripts/ are executable, have shebangs, pass shellcheck/pylint
    • Gitea connectivity: can authenticate to Gitea API with stored token
    • Forge-log structure: entries directory exists, templates are valid markdown
    • Health check: health_check.sh runs without errors and returns expected format
    • Ollama availability: local LLM endpoint responds (or gracefully reports unavailable)
    • File permissions: sensitive files (tokens, configs) have restrictive permissions
  • Tests use pytest with clear test names (test_profile_has_required_fields)
  • Tests can be run with pytest test_bezalel.py -v and produce a clean report
  • At least 20 individual test cases
  • Tests are idempotent and safe to run repeatedly
  • Add a conftest.py with shared fixtures if needed

Implementation Notes

  • Use pytest.mark.skipif for tests that need network access
  • Group tests into classes: TestProfile, TestScripts, TestGitea, TestForgeLog
  • Consider adding pytest-html for generating test reports that can be pushed to forge-log

Definition of Done

pytest test_bezalel.py -v passes with 20+ tests and clear output showing what was validated.

## Summary The current `test_bezalel.py` at `/root/wizards/bezalel/test_bezalel.py` needs to be expanded into a proper test suite with broad coverage of Bezalel's core capabilities. ## Motivation An artisan wizard must know when something is broken before a user reports it. Comprehensive tests are the foundation of self-awareness and reliability. ## Acceptance Criteria - [ ] Test suite covers at least these categories: - **Profile validation**: profile.yaml is valid YAML, has all required fields, paths exist - **Script integrity**: all scripts in `scripts/` are executable, have shebangs, pass shellcheck/pylint - **Gitea connectivity**: can authenticate to Gitea API with stored token - **Forge-log structure**: entries directory exists, templates are valid markdown - **Health check**: health_check.sh runs without errors and returns expected format - **Ollama availability**: local LLM endpoint responds (or gracefully reports unavailable) - **File permissions**: sensitive files (tokens, configs) have restrictive permissions - [ ] Tests use pytest with clear test names (`test_profile_has_required_fields`) - [ ] Tests can be run with `pytest test_bezalel.py -v` and produce a clean report - [ ] At least 20 individual test cases - [ ] Tests are idempotent and safe to run repeatedly - [ ] Add a `conftest.py` with shared fixtures if needed ## Implementation Notes - Use `pytest.mark.skipif` for tests that need network access - Group tests into classes: `TestProfile`, `TestScripts`, `TestGitea`, `TestForgeLog` - Consider adding `pytest-html` for generating test reports that can be pushed to forge-log ## Definition of Done `pytest test_bezalel.py -v` passes with 20+ tests and clear output showing what was validated.
bezalel self-assigned this 2026-04-04 16:02:15 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bezalel/forge-log#6