feat(platform): expose amap server readiness
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -372,6 +372,7 @@ type OpsHealth struct {
|
||||
type RuntimeInfo struct {
|
||||
RequestTimeoutMs int `json:"requestTimeoutMs"`
|
||||
AMapWebJSConfigured bool `json:"amapWebJsConfigured"`
|
||||
AMapAPIConfigured bool `json:"amapApiConfigured"`
|
||||
AMapSecurityProxyEnabled bool `json:"amapSecurityProxyEnabled"`
|
||||
AMapSecurityCodeExposed bool `json:"amapSecurityCodeExposed"`
|
||||
AMapSecurityServiceHost string `json:"amapSecurityServiceHost"`
|
||||
|
||||
Reference in New Issue
Block a user