Skip to content

test(cli): compress / config schema / log --export 통합 테스트 추가#315

Merged
erishforG merged 4 commits into
developfrom
test/auto-compress-schema-logexport
May 24, 2026
Merged

test(cli): compress / config schema / log --export 통합 테스트 추가#315
erishforG merged 4 commits into
developfrom
test/auto-compress-schema-logexport

Conversation

@erishforG
Copy link
Copy Markdown
Owner

무엇

v0.4.0에서 추가된 세 커맨드(compress, config schema, log --export)에 대한 통합 테스트 4개를 tests/cli_tests.rs에 추가합니다.

테스트 커버 내용
test_compress_nothing_to_do 단일 커밋 worktree → "Nothing to compress" 출력 및 exit 0
test_compress_squashes_commits 2-커밋 브랜치 → 1개로 squash + merge-base 위 커밋 수 assert
test_config_schema_outputs_json config schema → valid JSON & JSON Schema 필드 검증
test_history_log_export_empty 빈 execlog → exit 0, stdout 없음 또는 안내 stderr

세 커맨드 모두 v0.4.0에서 신규 추가됐지만 cli_tests.rs에 커버리지가 전혀 없었음. 회귀 방지 안전망 확보.

변경

  • tests/cli_tests.rs +166줄 (테스트 전용, 프로덕션 코드 무변경)

리스크

없음 — 테스트만 추가, cargo build/clippy/fmt 모두 통과

롤백

테스트 파일 라인 삭제만으로 완전 롤백 가능

Test plan

cargo test --quiet       # 전체 44 tests 통과 (이전 40개)
cargo clippy -- -D warnings  # 경고 없음
cargo fmt --check        # 포맷 일치

Closes #314

@erishforG 리뷰 부탁드립니다 🖤

erishforG and others added 3 commits May 4, 2026 20:33
docs: ship v0.4.0 versioned snapshot
…xport

Cover three commands added in v0.4.0 that had zero test coverage:
- test_compress_nothing_to_do: single-commit worktree exits cleanly
- test_compress_squashes_commits: 2-commit branch is reduced to 1
- test_config_schema_outputs_json: output is valid JSON Schema
- test_history_log_export_empty: empty log exits 0 with no stdout

Closes #314

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@erishforG erishforG added the auto-improvement Daily auto-generated improvement PR/issue label May 24, 2026
@erishforG erishforG changed the base branch from main to develop May 24, 2026 03:05
@erishforG erishforG merged commit 8fb0e07 into develop May 24, 2026
12 checks passed
@erishforG erishforG deleted the test/auto-compress-schema-logexport branch May 24, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-improvement Daily auto-generated improvement PR/issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(cli): compress / config schema / history log-export 통합 테스트 추가

1 participant