fix(topdata): target git.westgate.pw and stub released parts manifest in tests

The reprovision retired gitea.westgate.pw in favour of git.westgate.pw, but
internal/topdata still defaulted to the old host and made a live API call
during the native buildability check, so once CI checkout was fixed the
parts tests failed (DNS, then HTTP 404).

- defaultGiteaBaseURL -> https://git.westgate.pw; normalize git-ssh. -> git.
- Add stubEmptyPartsManifest (stub_test.go) and call it from the 2 non-optional
  parts tests so they exercise the build offline. Per-test (t.Setenv) on
  purpose: a global TestMain SOW_ASSETS_SERVER_URL would override the
  git-remote-derived server other tests configure. VFX tests already pass
  (optional consumer ignores HTTP 404).

make check + make smoke green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-13 20:24:57 +02:00
co-authored by Claude Opus 4.8
parent 472d4a58bc
commit bdae9d18e4
4 changed files with 41 additions and 4 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ import (
const (
defaultSowAssetsRepoOwner = "ShadowsOverWestgate"
defaultSowAssetsRepoName = "sow-assets"
defaultGiteaBaseURL = "https://gitea.westgate.pw"
defaultGiteaBaseURL = "https://git.westgate.pw"
partsManifestReleaseTag = "parts-manifest-current"
partsManifestAssetName = "sow-parts-manifest.json"
partsManifestCacheFileName = "sow-parts-manifest.json"
@@ -148,7 +148,7 @@ func parseRepoSpec(raw string) (giteaRepoSpec, bool) {
func normalizeGiteaHTTPHost(host string) string {
host = strings.TrimSpace(host)
if strings.HasPrefix(host, "git-ssh.") {
return "gitea." + strings.TrimPrefix(host, "git-ssh.")
return "git." + strings.TrimPrefix(host, "git-ssh.")
}
return host
}