Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

Commit a1e6e47

Browse files
author
Jamie Klassen
committed
fix worker memory test
looks like we changed the semantics away from using garden's "total usage toward limit" number and instead used the recommended computation from the linux kernel documentation. Signed-off-by: Jamie Klassen <jklassen@vmware.com>
1 parent e739b81 commit a1e6e47

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

accounts/worker_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ func (s *LANWorkerSuite) TestLANWorkerGetsMemory() {
6767
"container-handle": garden.ContainerMetricsEntry{
6868
Metrics: garden.Metrics{
6969
MemoryStat: garden.ContainerMemoryStat{
70-
TotalUsageTowardLimit: 123,
70+
TotalRss: 10,
71+
TotalCache: 20,
72+
TotalSwap: 30,
7173
},
7274
},
7375
Err: nil,
@@ -82,7 +84,7 @@ func (s *LANWorkerSuite) TestLANWorkerGetsMemory() {
8284
s.NoError(err)
8385
s.Len(containers, 1)
8486
s.Equal(containers[0].Handle, "container-handle")
85-
s.Equal(uint64(123), containers[0].Stats.Memory)
87+
s.Equal(uint64(60), containers[0].Stats.Memory)
8688
}
8789

8890
type K8sGardenDialerSuite struct {

0 commit comments

Comments
 (0)