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:
2026-04-29 12:03:57 -04:00
parent 76a3cb798a
commit f6c30f2fe8
3 changed files with 7 additions and 2 deletions
+3
View File
@@ -62,3 +62,6 @@ scripts/.cache/
# Locally-produced AppImage artifacts
*.AppImage
# Bats test scratch directories (created/cleaned per test)
.test-scratch/
+2 -1
View File
@@ -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"
+2 -1
View File
@@ -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