mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-01 21:10:13 +00:00
Use balloon-aware total for Proxmox freemem fallback (#1319)
This commit is contained in:
parent
17bfec6d1d
commit
be20b22047
2 changed files with 36 additions and 4 deletions
|
|
@ -151,6 +151,27 @@ func TestSelectVMLowTrustUsedMemory(t *testing.T) {
|
|||
wantUsed: 2 * giB,
|
||||
wantSource: "status-freemem",
|
||||
},
|
||||
{
|
||||
name: "uses balloon total when deriving used from status freemem",
|
||||
memTotal: 8 * giB,
|
||||
status: &proxmox.VMStatus{
|
||||
Balloon: 4 * giB,
|
||||
FreeMem: 1 * giB,
|
||||
},
|
||||
wantUsed: 3 * giB,
|
||||
wantSource: "status-freemem",
|
||||
},
|
||||
{
|
||||
name: "uses balloon total when status mem is falsely saturated against balloon",
|
||||
memTotal: 8 * giB,
|
||||
status: &proxmox.VMStatus{
|
||||
Mem: 4 * giB,
|
||||
Balloon: 4 * giB,
|
||||
FreeMem: 1 * giB,
|
||||
},
|
||||
wantUsed: 3 * giB,
|
||||
wantSource: "status-freemem",
|
||||
},
|
||||
{
|
||||
name: "returns empty selection without usable fields",
|
||||
memTotal: 8 * giB,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue