Use internal mock host for release assets

This commit is contained in:
rcourtman 2025-11-12 21:23:01 +00:00
parent 8b2d64b583
commit e3952a073c
2 changed files with 2 additions and 1 deletions

View file

@ -9,6 +9,7 @@ services:
- "8080:8080" - "8080:8080"
environment: environment:
- PORT=8080 - PORT=8080
- MOCK_BASE_URL=http://mock-github:8080
# Control test scenarios via environment variables # Control test scenarios via environment variables
- MOCK_CHECKSUM_ERROR=${MOCK_CHECKSUM_ERROR:-false} - MOCK_CHECKSUM_ERROR=${MOCK_CHECKSUM_ERROR:-false}
- MOCK_NETWORK_ERROR=${MOCK_NETWORK_ERROR:-false} - MOCK_NETWORK_ERROR=${MOCK_NETWORK_ERROR:-false}

View file

@ -107,7 +107,7 @@ func main() {
} }
limiter := newRateLimiter() limiter := newRateLimiter()
baseURL := fmt.Sprintf("http://localhost:%s", port) baseURL := getenvDefault("MOCK_BASE_URL", fmt.Sprintf("http://mock-github:%s", port))
// Environment-controlled behavior // Environment-controlled behavior
checksumError := os.Getenv("MOCK_CHECKSUM_ERROR") == "true" checksumError := os.Getenv("MOCK_CHECKSUM_ERROR") == "true"