Commit 954560b
committed
fix(tests): make worktree/sanity tests pass on ubuntu CI
Two independent, pre-existing test bugs surfaced on ubuntu-latest (macos
passed) after a GitHub runner image change plus the find-based test order:
1. create_test_repo ran git init + git commit in a sandboxed empty $HOME
without configuring user.name/user.email, relying on the runner's
ambient git config. The current ubuntu image no longer provides one, so
the commit aborted with 'fatal: empty ident name not allowed'. Set an
explicit local git identity in the sandbox repo.
2. The runner sets the sandbox $HOME once and relies on each test file's
cleanup to leave it existing for the next file. sanity's cleanup did
'rm -rf $HOME' without recreating it, unlike worktree's cleanup. find
orders sanity before worktree on ubuntu, so worktree's setup
'touch $HOME/$fingerprint' silently failed and the teardown's
assert_file_exists then failed, making the file exit non-zero even
though all assertions passed. Add 'mkdir -p $HOME' to match worktree's
cleanup convention. This was masked until bug #1 was fixed, because
finish_tests exited before cleanup ran while tests were failing.1 parent a2b2fd9 commit 954560b
2 files changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
0 commit comments