feat(platform): expose amap server readiness

This commit is contained in:
lingniu
2026-07-04 17:53:03 +08:00
parent aa384732ef
commit eb8f15ca18
10 changed files with 39 additions and 8 deletions

View File

@@ -898,6 +898,7 @@ func TestHandlerOpsHealthIncludesVehicleServiceRuntime(t *testing.T) {
handler := NewHandler(NewServiceWithRuntime(NewMockStore(), RuntimeInfo{
RequestTimeoutMs: 1500,
AMapWebJSConfigured: true,
AMapAPIConfigured: true,
AMapSecurityProxyEnabled: true,
AMapSecurityCodeExposed: false,
AMapSecurityServiceHost: "/_AMapService",
@@ -921,6 +922,9 @@ func TestHandlerOpsHealthIncludesVehicleServiceRuntime(t *testing.T) {
if !body.Data.Runtime.AMapWebJSConfigured || !body.Data.Runtime.AMapSecurityProxyEnabled {
t.Fatalf("ops health should expose AMap runtime readiness, got %+v body=%s", body.Data.Runtime, rec.Body.String())
}
if !body.Data.Runtime.AMapAPIConfigured {
t.Fatalf("ops health should expose server-side AMap API readiness, got %+v body=%s", body.Data.Runtime, rec.Body.String())
}
if body.Data.Runtime.AMapSecurityCodeExposed {
t.Fatalf("ops health should show that AMap security code is not exposed when proxy is enabled: %+v", body.Data.Runtime)
}