chore(tests): подтвердить общую регрессию интерфейса и backend
This commit is contained in:
1 parent
b525e70655
commit
efdfc6f224
13 files changed
+606
-14
No files matched your search
@@ -9,5 +9,7 @@ test("dashboard server catalog validates identities and keeps unknown status",()
|
||||
})
|
||||
test("dashboard probes validate real shape, uniqueness and numeric ranges before publication",()=>{
|
||||
assert.equal(parseDashboardProbes({probes:[probe]}).probes[0].rtt,null);assert.deepEqual(parseDashboardProbes({probes:[]}),{probes:[],sampledAt:null})
|
||||
for(const raw of [{},{probes:[probe,probe]},{probes:[{...probe,loss:101}]},{probes:[{...probe,status:"invalid"}]},{probes:[{...probe,series:[null]}]},{probes:[{}]}])assert.throws(()=>parseDashboardProbes(raw))
|
||||
const legacyGap=parseDashboardProbes({probes:[{...probe,series:[null]}]}).probes[0]
|
||||
assert.equal(legacyGap.status,"unknown");assert(legacyGap.series.every(v=>v===null))
|
||||
for(const raw of [{},{probes:[probe,probe]},{probes:[{...probe,loss:101}]},{probes:[{...probe,status:"invalid"}]},{probes:[{...probe,series:[-1]}]},{probes:[{...probe,series:[NaN]}]},{probes:[{}]}])assert.throws(()=>parseDashboardProbes(raw))
|
||||
})
|
||||
Reference in new issue
Block a user