Skip to content

Commit

Permalink
Add GetMemIgnoringCGroups to fake sigar interface
Browse files Browse the repository at this point in the history
[#179517901] Update Bosh Agent to correctly report memory used in `bosh vms --vitals` and related code paths, and publish new stemcells

Signed-off-by: Kenneth Lakin <klakin@vmware.com>
  • Loading branch information
ystros authored and klakin-pivotal committed Sep 9, 2021
1 parent cb8b796 commit 93c7b08
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fakes/fake_sigar.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ type FakeSigar struct {
LoadAverage sigar.LoadAverage
LoadAverageErr error

Mem sigar.Mem
MemErr error
Mem sigar.Mem
MemIgnoringCGroups sigar.Mem
MemErr error

Swap sigar.Swap
SwapErr error
Expand Down Expand Up @@ -62,6 +63,10 @@ func (f *FakeSigar) GetMem() (sigar.Mem, error) {
return f.Mem, f.MemErr
}

func (f *FakeSigar) GetMemIgnoringCGroups() (sigar.Mem, error) {
return f.MemIgnoringCGroups, f.MemErr
}

func (f *FakeSigar) GetSwap() (sigar.Swap, error) {
return f.Swap, f.SwapErr
}
Expand Down

0 comments on commit 93c7b08

Please sign in to comment.