From a445b6048148546e3ecaf454dfee2f7bf125fdec Mon Sep 17 00:00:00 2001 From: Boden Date: Wed, 27 May 2026 13:20:09 -0500 Subject: [PATCH] fix(review): apply autofix feedback --- scripts/tests/error-path-smoke.sh | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/scripts/tests/error-path-smoke.sh b/scripts/tests/error-path-smoke.sh index 4d09925b..39c1ca33 100755 --- a/scripts/tests/error-path-smoke.sh +++ b/scripts/tests/error-path-smoke.sh @@ -15,6 +15,17 @@ cleanup() { } trap cleanup EXIT +# Create a minimal fixture for successful exports +cat >"$TMP_DIR/fixture-append.json" <<'EOF' +{ + "guild": {"id": "222", "name": "Fixture Guild"}, + "channel": {"id": "111", "name": "fixture-room", "category": "Testing Grounds"}, + "messages": [], + "dateRange": {"after": null, "before": null}, + "exportedAt": "2026-01-01T00:00:00Z" +} +EOF + cat >"$FAKE_CLI" <<'EOF' #!/usr/bin/env bash set -Eeuo pipefail @@ -46,7 +57,7 @@ case "$subcommand" in esac done # Return a minimal valid export for success cases - cp /tmp/dce-fixture-append.json "$output" 2>/dev/null || echo '{"messages":[]}' >"$output" + cp "${FAKE_DCE_FIXTURE_PATH:?}" "$output" 2>/dev/null || echo '{"messages":[]}' >"$output" ;; *) echo "unexpected subcommand: $subcommand" >&2 @@ -56,16 +67,6 @@ esac EOF chmod +x "$FAKE_CLI" -# Create a minimal fixture for successful exports -cat >"$TMP_DIR/fixture-append.json" <<'EOF' -{ - "guild": {"id": "222", "name": "Fixture Guild"}, - "channel": {"id": "111", "name": "fixture-room", "category": "Testing Grounds"}, - "messages": [], - "dateRange": {"after": null, "before": null}, - "exportedAt": "2026-01-01T00:00:00Z" -} -EOF export FAKE_DCE_FIXTURE_PATH="$TMP_DIR/fixture-append.json" run_with_config() {