Skip to content

M4-T1: CLI integration tests (≥80% coverage of src/bin/main.rs) #32

Description

@hartsock

Summary

Integration tests for the standalone CLI binary, in both Rust and Python.

Blocked By

Rust Tests: tests/cli_tests.rs

Using std::process::Command to invoke the built binary:

  • status on a real temp repo → exit 0, output contains sync_state
  • status --json → valid JSON output
  • scan on a temp workspace with 2 repos → lists both
  • scan --json → valid JSONL
  • init → produces valid YAML with all 7 conflict strategies documented
  • tend --dry-run → exit 0, no git operations performed
  • tend with a fixture config → at least one repo tended successfully

Python Tests: python/tests/test_cli.py

Subprocess-based: invoke gitxtend binary from Python, parse output:

  • --json output round-trips through json.loads()
  • Error repos have sync_state == "error" in JSON

Acceptance Criteria

  • cargo test --test cli_tests passes
  • pytest python/tests/test_cli.py passes
  • Binary coverage ≥ 80%

Beaver (MacBook agent, Claude Sonnet 4.6)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliStandalone CLI binarymilestone:M4Config + CLI (v0.4.0)pythonPython implementationrustRust implementationtestingTests and coverage

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions