fix(store): coalesce NULL avg_latency_ms in HourlyBuckets
This commit is contained in:
1 parent
9b26b4150e
commit
db37060c70
3 files changed
+17
-2
No files matched your search
@@ -263,6 +263,21 @@ func TestStatusPageGroupsAndDetails(t *testing.T) {
|
||||
}
|
||||
webID := newMonitor("web", up.URL, mgChild["id"])
|
||||
apiID := newMonitor("api", down.URL, mgRoot["id"])
|
||||
// Heartbeat monitors record NULL latency_ms; ensure HourlyBuckets handles them
|
||||
// cleanly when show_component_details is enabled.
|
||||
st, hbBody := owner.do("POST", "/api/v1/org/monitors", map[string]any{
|
||||
"name": "nightly-job",
|
||||
"type": "heartbeat",
|
||||
"interval_seconds": 3600,
|
||||
})
|
||||
if st != http.StatusCreated {
|
||||
t.Fatalf("create heartbeat monitor = %d %v, want 201", st, hbBody)
|
||||
}
|
||||
hbResp, err := e.srv.Client().Post(e.srv.URL+"/hb/"+hbBody["target"].(string), "text/plain", strings.NewReader(""))
|
||||
if err != nil {
|
||||
t.Fatalf("ping heartbeat error = %v", err)
|
||||
}
|
||||
_ = hbResp.Body.Close()
|
||||
|
||||
slug := uniq("nested-")
|
||||
st, pageBody := owner.do("POST", "/api/v1/org/statuspages", map[string]any{
|
||||
|
||||
Reference in new issue
Block a user