Skip to content

Commit

Permalink
Merge pull request #169 from kolyshkin/cap-fixup
Browse files Browse the repository at this point in the history
capability: fix broken test
  • Loading branch information
kolyshkin authored Oct 10, 2024
2 parents da487b0 + cf2cc8f commit 669b603
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions capability/capability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ const (
)

func requirePCapSet(t *testing.T) {
pid, err := NewPid(0)
pid, err := NewPid2(0)
if err != nil {
t.Fatal(err)
}
if err := pid.Load(); err != nil {
t.Fatal(err)
}
if !pid.Get(EFFECTIVE, CAP_SETPCAP) {
t.Skip("The test needs `CAP_SETPCAP`.")
}
Expand Down Expand Up @@ -114,7 +117,7 @@ func TestAmbientCapSet(t *testing.T) {
capInheritable := []Cap{CAP_KILL, CAP_CHOWN}
capAmbient := []Cap{CAP_KILL, CAP_CHOWN}

pid, err := newPid(0)
pid, err := NewPid2(0)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 669b603

Please sign in to comment.