From a2468c50f107677e85f626af0441a1fb288be129 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 5 Nov 2026 10:48:06 -0700 Subject: [PATCH] smoketest: send gitea.federated.computer/david's URL to the fake upstream too install.sh at every baseline in smoketest/baselines clones from https://gitea.federated.computer/david/coredesktop.git, which wasn't in COREDESKTOP_URLS. So 30-upgrade-from-baseline installed today's real upstream (via Gitea's redirect) instead of the baseline, and failed when the old install.sh asked for files that have since gone. Add a test that every URL install.sh has ever cloned from is in the list. Co-Authored-By: Claude Opus 5.5 --- smoketest/lib/scenario.sh | 1 + tests/smoketest.bats | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/smoketest/lib/scenario.sh b/smoketest/lib/scenario.sh index d3434e8..507eb8f 100644 --- a/smoketest/lib/scenario.sh +++ b/smoketest/lib/scenario.sh @@ -18,6 +18,7 @@ WORK="$SMOKETEST_VM_DIR/work" # clones the fake upstream instead COREDESKTOP_URLS=( https://gitea.federated.computer/Federated_Computer/coredesktop.git + https://gitea.federated.computer/david/coredesktop.git https://gitea.young.computer/david/coredesktop.git ) diff --git a/tests/smoketest.bats b/tests/smoketest.bats index 0f9b40a..24be48e 100644 --- a/tests/smoketest.bats +++ b/tests/smoketest.bats @@ -60,6 +60,16 @@ upstream_main() { done } +@test "every URL install.sh has ever cloned from goes to the fake upstream" { + local repo="$BATS_TEST_DIRNAME/.." url + [ "$(git -C "$repo" rev-parse --is-shallow-repository)" = false ] \ + || skip "needs install.sh's full history" + while read -r url; do + printf '%s\n' "${COREDESKTOP_URLS[@]}" | grep -qxF "$url" \ + || { echo "install.sh has cloned from $url, which isn't in COREDESKTOP_URLS"; return 1; } + done < <(git -C "$repo" log -p -- install.sh | grep -oE 'https?://[^ "]*coredesktop\.git' | sort -u) +} + @test "prepare can run twice" { smoketest_prepare smoketest_prepare