fix: add HTTP backend readiness probes (#97)

This commit is contained in:
2026-09-26 23:43:10 +01:00
committed by GitHub
parent 85531966fe
commit c41f7907dd
8 changed files with 355 additions and 74 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ func TestApiBackendHealth_HealthyManager_Returns200(t *testing.T) {
defer func() { backendHealthManager = orig }()
// inject a healthy manager directly (bypassing sync.Once)
mgr := NewBackendHealthManager(&fasthttp.Client{}, "http://localhost:8080", libpack_logger.New())
mgr := NewBackendHealthManager(&fasthttp.Client{}, "http://localhost:8080", "", libpack_logger.New())
mgr.isHealthy.Store(true)
backendHealthManager = mgr
@@ -86,7 +86,7 @@ func TestApiBackendHealth_UnhealthyManager_Returns503(t *testing.T) {
orig := backendHealthManager
defer func() { backendHealthManager = orig }()
mgr := NewBackendHealthManager(&fasthttp.Client{}, "http://localhost:8080", libpack_logger.New())
mgr := NewBackendHealthManager(&fasthttp.Client{}, "http://localhost:8080", "", libpack_logger.New())
mgr.isHealthy.Store(false)
backendHealthManager = mgr