Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions plugins/auto-updater/tests/auto-updater-specific.bats
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ setup() {
export TEST_DIR="${BATS_TEST_DIRNAME}"
export SCRIPT_DIR="${TEST_DIR}/../scripts"
export FIXTURES_DIR="${TEST_DIR}/fixtures"
export TEMP_DIR="${BATS_TMPDIR}/auto-updater-test-$$"
# Use BATS_TEST_NAME to ensure unique temp directory per test
export TEMP_DIR="${BATS_TMPDIR}/auto-updater-test-${BATS_TEST_NAME}"

mkdir -p "$TEMP_DIR"
export HOME="$TEMP_DIR"
Expand Down Expand Up @@ -81,23 +82,13 @@ EOF
export CLAUDE_PLUGIN_ROOT="$FIXTURES_DIR/../../.."
export MARKETPLACE_FILE="$FIXTURES_DIR/marketplace.json"

# Debug: Log environment variables (remove after fix)
echo "TEST: CONFIG_DIR=$CONFIG_DIR" >&3
echo "TEST: TIMESTAMP_FILE=$TIMESTAMP_FILE" >&3
echo "TEST: HOME=$HOME" >&3
ls -la "$CONFIG_DIR" >&3 || true

# Timestamp should not exist initially
[ ! -f "$CONFIG_DIR/last-check" ]

# Run without --check-only to trigger timestamp creation
run "$SCRIPT_DIR/update-checker.sh" --silent
[ "$status" -eq 0 ]

# Debug: Check if file exists after run
echo "TEST: After run - CONFIG_DIR=$CONFIG_DIR" >&3
ls -la "$CONFIG_DIR" >&3 || true

# Timestamp file should now exist
[ -f "$CONFIG_DIR/last-check" ]

Expand Down
Loading