1
0
Fork 0
mirror of https://github.com/imjasonh/snoop synced 2026-07-15 04:35:26 +00:00
snoop/pkg/cgroup/discovery_test.go
Jason Hall f793a98161 initial commit
Signed-off-by: Jason Hall <jason@chainguard.dev>
2026-01-14 09:55:28 -05:00

21 lines
453 B
Go

package cgroup
import (
"testing"
)
func TestGetSelfCgroupID(t *testing.T) {
// This test will fail on non-Linux systems, which is expected
// Skip if /proc/self/cgroup doesn't exist
_, err := GetSelfCgroupID()
if err != nil {
t.Skipf("Skipping test on non-Linux system: %v", err)
}
}
func TestNewSelfExcludingDiscovery(t *testing.T) {
d := NewSelfExcludingDiscovery()
if d == nil {
t.Fatal("NewSelfExcludingDiscovery returned nil")
}
}