Skip to content

Cover git update failure paths#343

Merged
codeforester merged 1 commit into
masterfrom
enhancement/333-20260531-lib-git-failure-tests
May 31, 2026
Merged

Cover git update failure paths#343
codeforester merged 1 commit into
masterfrom
enhancement/333-20260531-lib-git-failure-tests

Conversation

@codeforester
Copy link
Copy Markdown
Owner

Summary

  • Add git_update_repo tests for missing origin, unreachable origin, and non-fast-forward remote history.
  • Make git_update_repo pull with --ff-only so divergent histories fail without mutating the local checkout.
  • Strengthen the basectl update dirty-worktree test to prove the git update path is not loaded or called.

Validation

  • bats lib/bash/git/tests/lib_git.bats
  • bats cli/bash/commands/basectl/tests/update.bats
  • bash -n lib/bash/git/lib_git.sh cli/bash/commands/basectl/tests/update.bats lib/bash/git/tests/lib_git.bats
  • env -u BASE_HOME HOME=/private/tmp/base-review-home BASE_TEST_PYTHON=/Users/rameshhp/.base.d/base/.venv/bin/python bin/base-test
  • git diff --check

Closes #333

@codeforester codeforester merged commit 96c7316 into master May 31, 2026
16 checks passed
@codeforester codeforester deleted the enhancement/333-20260531-lib-git-failure-tests branch May 31, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lib_git.sh has no tests for failure paths: network timeout, non-fast-forward, dirty worktree

1 participant