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