test: move bats scratch dirs to repo-local .test-scratch/ (per global no-/tmp/ rule)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,8 @@ teardown() {
|
||||
# Build a minimal disposable repo that mimics the sethLabels structure with a
|
||||
# local "upstream/master" ref. Returns its path via stdout.
|
||||
make_test_repo() {
|
||||
local tmp=$(mktemp -d)
|
||||
mkdir -p "$REPO_ROOT/.test-scratch"
|
||||
local tmp=$(mktemp -d -p "$REPO_ROOT/.test-scratch")
|
||||
cd "$tmp"
|
||||
git init -q -b master
|
||||
git config user.email "test@test"
|
||||
|
||||
@@ -47,7 +47,8 @@ setup() {
|
||||
|
||||
@test "fails cleanly when upstream/master ref is missing" {
|
||||
# Run in a temp git repo with no upstream remote.
|
||||
tmp=$(mktemp -d)
|
||||
mkdir -p "$REPO_ROOT/.test-scratch"
|
||||
tmp=$(mktemp -d -p "$REPO_ROOT/.test-scratch")
|
||||
cd "$tmp"
|
||||
git init -q
|
||||
git commit --allow-empty -m "init" -q
|
||||
|
||||
Reference in New Issue
Block a user