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:
@@ -62,3 +62,6 @@ scripts/.cache/
|
|||||||
|
|
||||||
# Locally-produced AppImage artifacts
|
# Locally-produced AppImage artifacts
|
||||||
*.AppImage
|
*.AppImage
|
||||||
|
|
||||||
|
# Bats test scratch directories (created/cleaned per test)
|
||||||
|
.test-scratch/
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ teardown() {
|
|||||||
# Build a minimal disposable repo that mimics the sethLabels structure with a
|
# Build a minimal disposable repo that mimics the sethLabels structure with a
|
||||||
# local "upstream/master" ref. Returns its path via stdout.
|
# local "upstream/master" ref. Returns its path via stdout.
|
||||||
make_test_repo() {
|
make_test_repo() {
|
||||||
local tmp=$(mktemp -d)
|
mkdir -p "$REPO_ROOT/.test-scratch"
|
||||||
|
local tmp=$(mktemp -d -p "$REPO_ROOT/.test-scratch")
|
||||||
cd "$tmp"
|
cd "$tmp"
|
||||||
git init -q -b master
|
git init -q -b master
|
||||||
git config user.email "test@test"
|
git config user.email "test@test"
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ setup() {
|
|||||||
|
|
||||||
@test "fails cleanly when upstream/master ref is missing" {
|
@test "fails cleanly when upstream/master ref is missing" {
|
||||||
# Run in a temp git repo with no upstream remote.
|
# 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"
|
cd "$tmp"
|
||||||
git init -q
|
git init -q
|
||||||
git commit --allow-empty -m "init" -q
|
git commit --allow-empty -m "init" -q
|
||||||
|
|||||||
Reference in New Issue
Block a user