From 3fa791cd225371adba5532d7ebc08a584cc378c2 Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Sat, 17 Jan 2026 00:06:32 -0500 Subject: [PATCH] lint/fixes --- .github/workflows/lint.yaml | 4 ++-- Makefile | 4 ++-- tests/installer-test-completions.sh | 2 +- tests/system-test-clean-repack.sh | 17 +++++------------ 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 1d651c2..867acc6 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -44,7 +44,7 @@ jobs: run: make - name: Test Installer - run: bash ./tests/test-install-logic.sh + run: bash ./tests/installer-test-logic.sh - name: Install [make install] run: sudo make install @@ -81,7 +81,7 @@ jobs: run: make - name: Test Installer - run: bash ./tests/test-install-logic.sh + run: bash ./tests/installer-test-logic.sh - name: Install [make install] run: make install # container runs as sudo diff --git a/Makefile b/Makefile index 6349c40..089c93d 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ test/installer: ##H Test installer logic --include-pattern=install.sh \ --exclude-path=$(PWD)/.git,$(PWD)/tests \ $(COV_INSTALL) \ - "$$test_script" 2>&1 | tee -a .tmp/kcov.log; \ + "$$test_script" 2>&1 | (mkdir -p .tmp; tee -a .tmp/kcov.log); \ else \ bash "$$test_script" 2>&1 | tee -a .tmp/kcov.log; \ fi; \ @@ -212,7 +212,7 @@ install/user: ##H make install prefix=~/.local .PHONY: check/install check/install: ##H Verify installation works - bash ./tests/verify-system-install.sh + bash ./tests/installer-test-verify.sh .PHONY: uninstall/, uninstall diff --git a/tests/installer-test-completions.sh b/tests/installer-test-completions.sh index 0aa9466..efdf901 100644 --- a/tests/installer-test-completions.sh +++ b/tests/installer-test-completions.sh @@ -23,7 +23,7 @@ COMP_CWORD=0 COMPREPLY=() # --- Mock git --- -# shellcheck disable=SC2329 +# shellcheck disable=SC2329,SC2317 git() { if [[ $1 == "remote" ]]; then echo "origin" diff --git a/tests/system-test-clean-repack.sh b/tests/system-test-clean-repack.sh index d3f1fa2..acc1853 100755 --- a/tests/system-test-clean-repack.sh +++ b/tests/system-test-clean-repack.sh @@ -139,9 +139,10 @@ echo "Running clean --repack --force..." git-remote-gcrypt clean --repack --force origin # Verify garbage removal from backend -cd "$TEST_DIR/raw_backend" -git fetch origin master -git reset --hard origin/master +cd "$TEST_DIR" +rm -rf raw_backend_verify +git clone "$REMOTE_DIR" raw_backend_verify +cd raw_backend_verify if [ -f ".garbage (file)" ]; then echo "Failure: .garbage (file) still exists in backend!" @@ -151,16 +152,8 @@ else fi # Verify result -# Clone backend again (pull) and check structure -cd "$TEST_DIR/raw_backend" -git pull origin master - -# Count commits? Repack might add a commit? -# Repack reads all objects, creates 1 new pack, updates manifest. -# This results in a NEW commit on the backend that has the new manifest. -# The OLD packs are removed (deleted from backend). -# So we should see a new commit. # Check if commit SHA changed. Repack force-pushes a new manifest state. +cd "$TEST_DIR/raw_backend_verify" NEW_HEAD=$(git rev-parse HEAD) echo "Old HEAD: $HEAD_SHA" echo "New HEAD: $NEW_HEAD" -- 2.52.0