mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Windows CI: PortTestInspectApi*
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
03864c1db0
commit
3c61f00616
1 changed files with 19 additions and 5 deletions
|
@ -13,19 +13,29 @@ import (
|
|||
)
|
||||
|
||||
func (s *DockerSuite) TestInspectApiContainerResponse(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
|
||||
|
||||
cleanedContainerID := strings.TrimSpace(out)
|
||||
keysBase := []string{"Id", "State", "Created", "Path", "Args", "Config", "Image", "NetworkSettings",
|
||||
"ResolvConfPath", "HostnamePath", "HostsPath", "LogPath", "Name", "Driver", "MountLabel", "ProcessLabel", "GraphDriver"}
|
||||
|
||||
cases := []struct {
|
||||
type acase struct {
|
||||
version string
|
||||
keys []string
|
||||
}{
|
||||
{"v1.20", append(keysBase, "Mounts")},
|
||||
{"v1.19", append(keysBase, "Volumes", "VolumesRW")},
|
||||
}
|
||||
|
||||
var cases []acase
|
||||
|
||||
if daemonPlatform == "windows" {
|
||||
cases = []acase{
|
||||
{"v1.20", append(keysBase, "Mounts")},
|
||||
}
|
||||
|
||||
} else {
|
||||
cases = []acase{
|
||||
{"v1.20", append(keysBase, "Mounts")},
|
||||
{"v1.19", append(keysBase, "Volumes", "VolumesRW")},
|
||||
}
|
||||
}
|
||||
|
||||
for _, cs := range cases {
|
||||
|
@ -47,6 +57,7 @@ func (s *DockerSuite) TestInspectApiContainerResponse(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiContainerVolumeDriverLegacy(c *check.C) {
|
||||
// No legacy implications for Windows
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
|
||||
|
||||
|
@ -112,6 +123,7 @@ func (s *DockerSuite) TestInspectApiImageResponse(c *check.C) {
|
|||
|
||||
// #17131, #17139, #17173
|
||||
func (s *DockerSuite) TestInspectApiEmptyFieldsInConfigPre121(c *check.C) {
|
||||
// Not relevant on Windows
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "true")
|
||||
|
||||
|
@ -135,6 +147,7 @@ func (s *DockerSuite) TestInspectApiEmptyFieldsInConfigPre121(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiBridgeNetworkSettings120(c *check.C) {
|
||||
// Not relevant on Windows, and besides it doesn't have any bridge network settings
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
|
||||
containerID := strings.TrimSpace(out)
|
||||
|
@ -151,6 +164,7 @@ func (s *DockerSuite) TestInspectApiBridgeNetworkSettings120(c *check.C) {
|
|||
}
|
||||
|
||||
func (s *DockerSuite) TestInspectApiBridgeNetworkSettings121(c *check.C) {
|
||||
// Windows doesn't have any bridge network settings
|
||||
testRequires(c, DaemonIsLinux)
|
||||
out, _ := dockerCmd(c, "run", "-d", "busybox", "top")
|
||||
containerID := strings.TrimSpace(out)
|
||||
|
|
Loading…
Reference in a new issue