mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
integration-cli: use Devicemapper test requirement instead of checking strings
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
2a9e6ace70
commit
337ee2aa63
1 changed files with 3 additions and 10 deletions
|
@ -166,16 +166,12 @@ func (s *DockerSuite) TestInspectContainerFilterInt(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectImageGraphDriver(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
testRequires(c, DaemonIsLinux, Devicemapper)
|
||||
imageTest := "emptyfs"
|
||||
name := inspectField(c, imageTest, "GraphDriver.Name")
|
||||
|
||||
checkValidGraphDriver(c, name)
|
||||
|
||||
if name != "devicemapper" {
|
||||
c.Skip("requires devicemapper graphdriver")
|
||||
}
|
||||
|
||||
deviceID := inspectField(c, imageTest, "GraphDriver.Data.DeviceId")
|
||||
|
||||
_, err := strconv.Atoi(deviceID)
|
||||
|
@ -188,7 +184,8 @@ func (s *DockerSuite) TestInspectImageGraphDriver(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectContainerGraphDriver(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
testRequires(c, DaemonIsLinux, Devicemapper)
|
||||
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
|
||||
out = strings.TrimSpace(out)
|
||||
|
||||
|
@ -196,10 +193,6 @@ func (s *DockerSuite) TestInspectContainerGraphDriver(c *check.C) {
|
|||
|
||||
checkValidGraphDriver(c, name)
|
||||
|
||||
if name != "devicemapper" {
|
||||
return
|
||||
}
|
||||
|
||||
imageDeviceID := inspectField(c, "busybox", "GraphDriver.Data.DeviceId")
|
||||
|
||||
deviceID := inspectField(c, out, "GraphDriver.Data.DeviceId")
|
||||
|
|
Loading…
Reference in a new issue