Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

style(web): format hybrid memory regression fixture

pulse-triage[bot]238c9762ba2d
diff --git a/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts b/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts
index 11a2af621f..fbd7a71d0b 100644
--- a/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts
+++ b/frontend-modern/src/hooks/__tests__/useWorkloads.test.ts
@@ -298,16 +298,26 @@ describe('useWorkloads', () => {
it('tracks canonical hybrid VM memory without substituting nested agent readings', async () => {
// #1962: synthetic snapshots exercise Web reactivity, not poller recovery.
- const buildVM = (instance: string, percent?: number) => ({
- id: `${instance}-pve1-101`, type: 'vm', name: `${instance}-vm`,
- status: 'running', platformType: 'proxmox-pve', sourceType: 'hybrid',
- sources: ['proxmox', 'agent'],
- proxmox: { vmid: 101, nodeName: 'pve1', instance },
- memory: percent === undefined ? undefined : {
- current: percent, used: percent * 1024, total: 100 * 1024,
- },
- agent: { memory: { used: 35 * 1024, total: 100 * 1024, usage: 35 } },
- }) as any;
+ const buildVM = (instance: string, percent?: number) =>
+ ({
+ id: `${instance}-pve1-101`,
+ type: 'vm',
+ name: `${instance}-vm`,
+ status: 'running',
+ platformType: 'proxmox-pve',
+ sourceType: 'hybrid',
+ sources: ['proxmox', 'agent'],
+ proxmox: { vmid: 101, nodeName: 'pve1', instance },
+ memory:
+ percent === undefined
+ ? undefined
+ : {
+ current: percent,
+ used: percent * 1024,
+ total: 100 * 1024,
+ },
+ agent: { memory: { used: 35 * 1024, total: 100 * 1024, usage: 35 } },
+ }) as any;
const otherVM = buildVM('cluster-b', 80);
const [snapshot, setSnapshot] = createSignal([buildVM('cluster-a', 100), otherVM]);
let dispose = () => {};