mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-09 18:15:50 +00:00
style(web): format hybrid memory regression fixture
Apply the repository Prettier policy to the newly integrated issue #1962 reactive-boundary fixture. The exact reviewed candidate remains preserved as a merge parent, and the focused test behavior is unchanged. Change-source: pulse-maintainer
This commit is contained in:
@@ -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 = () => {};
|
||||
|
||||
Reference in New Issue
Block a user