mirror of
https://github.com/containers/podman.git
synced 2025-07-02 08:47:43 +08:00
Merge pull request #22635 from giuseppe/fix-test-for-powercap
test: improve test for powercap presence
This commit is contained in:
@ -14,6 +14,7 @@ import (
|
|||||||
"github.com/containers/common/pkg/config"
|
"github.com/containers/common/pkg/config"
|
||||||
"github.com/containers/podman/v5/libpod/define"
|
"github.com/containers/podman/v5/libpod/define"
|
||||||
. "github.com/containers/podman/v5/test/utils"
|
. "github.com/containers/podman/v5/test/utils"
|
||||||
|
"github.com/containers/storage/pkg/fileutils"
|
||||||
"github.com/containers/storage/pkg/stringid"
|
"github.com/containers/storage/pkg/stringid"
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
@ -455,8 +456,8 @@ var _ = Describe("Podman run", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman run powercap is masked", func() {
|
It("podman run powercap is masked", func() {
|
||||||
if os.Getenv("CI") != "" {
|
if err := fileutils.Exists("/sys/devices/virtual/powercap"); err != nil {
|
||||||
Skip("CI VMs do not have access to powercap")
|
Skip("/sys/devices/virtual/powercap is not present")
|
||||||
}
|
}
|
||||||
|
|
||||||
testCtr1 := "testctr"
|
testCtr1 := "testctr"
|
||||||
|
Reference in New Issue
Block a user