Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-mckay committed Jul 16, 2024
1 parent 563f4d0 commit d6d01fb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cgroup_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion collector/cgroupv1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion fixtures.ttar
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6d01fb

Please sign in to comment.