mirror of
https://github.com/containers/podman.git
synced 2025-12-02 02:58:03 +08:00
Switch to moby/sys/capability
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -8,9 +8,9 @@ import (
|
||||
"strings"
|
||||
|
||||
. "github.com/containers/podman/v5/test/utils"
|
||||
"github.com/moby/sys/capability"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"github.com/syndtr/gocapability/capability"
|
||||
)
|
||||
|
||||
// helper function for confirming that container capabilities are equal
|
||||
@@ -32,7 +32,7 @@ func containerCapMatchesHost(ctrCap string, hostCap string) {
|
||||
// and host caps must always be a superset (inclusive) of container
|
||||
Expect(hostCapN).To(BeNumerically(">", 0), "host cap %q should be nonzero", hostCap)
|
||||
Expect(hostCapN).To(BeNumerically(">=", ctrCapN), "host cap %q should never be less than container cap %q", hostCap, ctrCap)
|
||||
hostCapMasked := hostCapN & (1<<len(capability.List()) - 1)
|
||||
hostCapMasked := hostCapN & (1<<len(capability.ListKnown()) - 1)
|
||||
Expect(ctrCapN).To(Equal(hostCapMasked), "container cap %q is not a subset of host cap %q", ctrCap, hostCap)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user