diff --git a/cgroup_exporter_test.go b/cgroup_exporter_test.go index 6428df9..cf3680e 100644 --- a/cgroup_exporter_test.go +++ b/cgroup_exporter_test.go @@ -78,7 +78,7 @@ func TestMetricsHandler(t *testing.T) { if err != nil { t.Fatalf("Unexpected error GET /metrics: %s", err.Error()) } - if !strings.Contains(body, "cgroup_memory_used_bytes{cgroup=\"/user.slice/user-20821.slice\"} 8.081408e+06") { + if !strings.Contains(body, "cgroup_memory_used_bytes{cgroup=\"/user.slice/user-20821.slice\"} 2.711552e+07") { t.Errorf("Unexpected value for cgroup_memory_used_bytes: %s", body) } } diff --git a/collector/cgroupv1_test.go b/collector/cgroupv1_test.go index 33397fb..88beb79 100644 --- a/collector/cgroupv1_test.go +++ b/collector/cgroupv1_test.go @@ -53,7 +53,7 @@ func TestCollectUserSlice(t *testing.T) { if val := metrics[0].memoryCache; val != 2322432 { t.Errorf("Unexpected value for memoryCache, got %v", val) } - if val := metrics[0].memoryUsed; val != 8081408 { + if val := metrics[0].memoryUsed; val != 27115520 { t.Errorf("Unexpected value for memoryUsed, got %v", val) } if val := metrics[0].memoryTotal; val != 68719476736 { diff --git a/fixtures.ttar b/fixtures.ttar index 7b00250..9ff6436 100644 --- a/fixtures.ttar +++ b/fixtures.ttar @@ -5124,7 +5124,7 @@ Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Path: fixtures/memory/user.slice/user-20821.slice/memory.usage_in_bytes Lines: 1 -8081408 +27115520 Mode: 644 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Path: fixtures/memory/user.slice/user-20821.slice/memory.use_hierarchy