test(upgrade): run channel flow tests against the mock server offline
The `stable`, `canary`, `specific_stable` and `specific_canary` upgrade
spec tests each copied the binary and ran a real `deno upgrade`, hitting
GitHub / dl.deno.land and downloading a full ~40MB release on every CI
run. That wastes bandwidth and couples PR CI to the live release state
(a freshly published version could break the output match on unrelated
PRs).
Point these four at the existing test-server mock instead, the same way
`delta` and `checksum` already do, via DENO_TESTING_UPGRADE and
DENO_DONT_USE_INTERNAL_BASE_UPGRADE_URL. The version lookup and download
now resolve to localhost:4545, so the tests are fully offline,
deterministic (fixed sentinel versions), and run in tens of milliseconds
instead of ~13s. The mock serves a placeholder, non-executable binary,
so each upgrade runs through version resolution and the download and then
fails validation; the tests assert the resolved version and the mocked
download URL rather than a completed install.
Canary downloads previously had no test hook, so extend the
DENO_TESTING_UPGRADE redirect to the canary download URL in
get_download_url and teach the test server to serve zips under
/deno-upgrade/canary/, mirroring the existing /deno-upgrade/download/
handling.
The end-to-end tests that need a real runnable binary (space_in_tmp,
out) are intentionally left on the real network for now.