feat(platform): harden telemetry pipeline and unify Semi UI workspaces
This commit is contained in:
@@ -84,13 +84,13 @@ func TestHandlerV2MonitorSummaryAndMap(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestHandlerRejectsInvalidMonitorBounds(t *testing.T) {
|
||||
func TestHandlerIgnoresInvalidOptionalMonitorBounds(t *testing.T) {
|
||||
handler := NewHandler(NewService(NewMockStore()))
|
||||
request := httptest.NewRequest(http.MethodGet, "/api/v2/monitor/map?zoom=12&bounds=105,31,103,29", nil)
|
||||
response := httptest.NewRecorder()
|
||||
handler.ServeHTTP(response, request)
|
||||
if response.Code != http.StatusBadRequest || !strings.Contains(response.Body.String(), "MONITOR_BOUNDS_INVALID") {
|
||||
t.Fatalf("unexpected invalid bounds response: status=%d body=%s", response.Code, response.Body.String())
|
||||
if response.Code != http.StatusOK || !strings.Contains(response.Body.String(), `"mode"`) || strings.Contains(response.Body.String(), "MONITOR_BOUNDS_INVALID") {
|
||||
t.Fatalf("optional invalid bounds must degrade to an unbounded map response: status=%d body=%s", response.Code, response.Body.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user