Skip to content

Commit

Permalink
cgtracker_test: skip if test cannot mkdir
Browse files Browse the repository at this point in the history
In GH runners, we get:

--- FAIL: TestCgTrackerMap (0.12s)
    cgtracker_test.go:73: '/sys/fs/cgroup' is cgroup v1
    cgtracker_test.go:81: failed to create test dir: mkdir /sys/fs/cgroup/cgtracker-test-1715271346: read-only file system

So it seems that we cannot execute the test there. Skip it for now.

Signed-off-by: Kornilios Kourtis <kornilios@isovalent.com>
  • Loading branch information
kkourt committed Dec 2, 2024
1 parent b7f7628 commit 882a020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cgtracker/test/cgtracker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func cgfsMkdirTemp(t *testing.T, cgfsPath string) string {
// create tempdir
dir, err := os.MkdirTemp(cgfsPath, "cgtracker-test-*")
if err != nil {
t.Fatalf("failed to create test dir: %s", err)
t.Skipf("skipping test, failed to create test dir: %s", err)
}
t.Cleanup(func() {
err := os.RemoveAll(dir)
Expand Down

0 comments on commit 882a020

Please sign in to comment.