api: update test to reflect reality on Windows
The TestInspectAPIContainerResponse mentioned that Windows does not support API versions before v1.25. While technically, no stable release existed for Windows with API versions before that (seef811d5b128
), API version v1.24 was enabled ine4af39aeb3
, to have a consistend fallback version for API version negotiation. This patch updates the test to reflect that change. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
570d5a9645
commit
ed93110e11
2 changed files with 4 additions and 16 deletions
|
@ -20,26 +20,15 @@ func (s *DockerAPISuite) TestInspectAPIContainerResponse(c *testing.T) {
|
|||
keysBase := []string{
|
||||
"Id", "State", "Created", "Path", "Args", "Config", "Image", "NetworkSettings",
|
||||
"ResolvConfPath", "HostnamePath", "HostsPath", "LogPath", "Name", "Driver", "MountLabel", "ProcessLabel", "GraphDriver",
|
||||
"Mounts",
|
||||
}
|
||||
|
||||
type acase struct {
|
||||
cases := []struct {
|
||||
version string
|
||||
keys []string
|
||||
}{
|
||||
{version: "v1.24", keys: keysBase},
|
||||
}
|
||||
|
||||
var cases []acase
|
||||
|
||||
if testEnv.DaemonInfo.OSType == "windows" {
|
||||
// Windows only supports 1.25 or later
|
||||
cases = []acase{
|
||||
{"v1.25", append(keysBase, "Mounts")},
|
||||
}
|
||||
} else {
|
||||
cases = []acase{
|
||||
{"v1.24", append(keysBase, "Mounts")},
|
||||
}
|
||||
}
|
||||
|
||||
for _, cs := range cases {
|
||||
body := getInspectBody(c, cs.version, cleanedContainerID)
|
||||
|
||||
|
|
|
@ -31,7 +31,6 @@ func TestInfoBinaryCommits(t *testing.T) {
|
|||
|
||||
func TestInfoAPIVersioned(t *testing.T) {
|
||||
ctx := testutil.StartSpan(baseContext, t)
|
||||
// Windows only supports 1.25 or later
|
||||
|
||||
res, body, err := req.Get(ctx, "/v1.24/info")
|
||||
assert.NilError(t, err)
|
||||
|
|
Loading…
Reference in a new issue