ninth version
Deploy / Test, build and deploy (push) Failing after 1m6s

This commit is contained in:
2026-06-08 14:25:44 +00:00
parent e8b7d8e27c
commit 20cc8506ad
21 changed files with 847 additions and 148 deletions
+3 -3
View File
@@ -58,7 +58,7 @@ func Run(ctx context.Context, opts Options) error {
if opts.Healthcheck {
target := opts.HealthcheckURL
if target == "" {
target = "http://127.0.0.1:3300/health"
target = "http://127.0.0.1:3300/ready"
}
return healthcheck.CheckEndpoint(ctx, target)
}
@@ -465,12 +465,12 @@ func accountHash(accountID string) string {
func HealthURL(addr string) string {
if strings.HasPrefix(addr, ":") {
return "http://127.0.0.1" + addr + "/health"
return "http://127.0.0.1" + addr + "/ready"
}
if _, err := url.ParseRequestURI(addr); err == nil && strings.HasPrefix(addr, "http") {
return addr
}
return "http://" + addr + "/health"
return "http://" + addr + "/ready"
}
func PingDB(ctx context.Context, db *sql.DB) error {
+9
View File
@@ -36,6 +36,15 @@ func TestRunBacktestModeWithoutDB(t *testing.T) {
}
}
func TestHealthURLDefaultsToReadyEndpoint(t *testing.T) {
if got := HealthURL(":3300"); got != "http://127.0.0.1:3300/ready" {
t.Fatalf("HealthURL(:3300)=%s", got)
}
if got := HealthURL("127.0.0.1:3301"); got != "http://127.0.0.1:3301/ready" {
t.Fatalf("HealthURL(host)=%s", got)
}
}
func TestSeedPaperGatewayMakesSeedInstrumentsDiscoverable(t *testing.T) {
ctx := context.Background()
repo := testutil.NewMemoryRepository()