mirror of
https://github.com/containers/podman.git
synced 2025-06-26 04:46:57 +08:00
skip test for blkio.weight when kernel does not support it
Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -24,22 +24,22 @@ var (
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
rmiCommand = cli.Command{
|
rmiCommand = cli.Command{
|
||||||
Name: "rmi",
|
Name: "rmi",
|
||||||
Usage: "Removes one or more images from local storage",
|
Usage: "Removes one or more images from local storage",
|
||||||
Description: rmiDescription,
|
Description: rmiDescription,
|
||||||
Action: rmiCmd,
|
Action: rmiCmd,
|
||||||
ArgsUsage: "IMAGE-NAME-OR-ID [...]",
|
ArgsUsage: "IMAGE-NAME-OR-ID [...]",
|
||||||
Flags: sortFlags(rmiFlags),
|
Flags: sortFlags(rmiFlags),
|
||||||
UseShortOptionHandling: true,
|
UseShortOptionHandling: true,
|
||||||
OnUsageError: usageErrorHandler,
|
OnUsageError: usageErrorHandler,
|
||||||
}
|
}
|
||||||
rmImageCommand = cli.Command{
|
rmImageCommand = cli.Command{
|
||||||
Name: "rm",
|
Name: "rm",
|
||||||
Usage: "removes one or more images from local storage",
|
Usage: "removes one or more images from local storage",
|
||||||
Description: rmiDescription,
|
Description: rmiDescription,
|
||||||
Action: rmiCmd,
|
Action: rmiCmd,
|
||||||
ArgsUsage: "IMAGE-NAME-OR-ID [...]",
|
ArgsUsage: "IMAGE-NAME-OR-ID [...]",
|
||||||
Flags: rmiFlags,
|
Flags: rmiFlags,
|
||||||
UseShortOptionHandling: true,
|
UseShortOptionHandling: true,
|
||||||
OnUsageError: usageErrorHandler,
|
OnUsageError: usageErrorHandler,
|
||||||
}
|
}
|
||||||
|
@ -253,6 +253,9 @@ var _ = Describe("Podman run", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman run blkio-weight test", func() {
|
It("podman run blkio-weight test", func() {
|
||||||
|
if _, err := os.Stat("/sys/fs/cgroup/blkio/blkio.weight"); os.IsNotExist(err) {
|
||||||
|
Skip("Kernel does not support blkio.weight")
|
||||||
|
}
|
||||||
session := podmanTest.Podman([]string{"run", "--rm", "--blkio-weight=15", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.weight"})
|
session := podmanTest.Podman([]string{"run", "--rm", "--blkio-weight=15", ALPINE, "cat", "/sys/fs/cgroup/blkio/blkio.weight"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
|
Reference in New Issue
Block a user