You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check port valid
req=&{Method:POST URL:/v1.24/containers/create Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[] Body:{Reader:{"Cmd":["/bin/sh","-c"," echo test"],"Image":"busybox","PortBindings":{"8080/tcp":[{"HostIP":"","HostPort":"aa80"}]}}
Request like above should not return 201
POST /containers/create with nil config, pouch return 400 ,docker return 500
POST /containers/create with multiple network, should return 400, now pouch return 201
req=&{Method:POST URL:/v1.24/containers/create Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[] Body:{Reader:{"Image":"busybox","Netw orkingConfig":{"EndpointsConfig":{"net1":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"","Gateway":"","IPAdd ress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"","Time":0,"SkipResolver":false},"n et2":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gatewa y":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"","Time":0,"SkipResolver":false},"net3":{"IPAMConfig":null,"Links":null ,"Aliases":null,"NetworkID":"","EndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","Global IPv6PrefixLen":0,"MacAddress":"","Time":0,"SkipResolver":false}}}}
POST /container/create with nil content-type, docker return 500 while pouch return 201
the same for wrong content-type
POST /containers/create with invalid port syntax expect return 500, while return 201
the invalid syntax is as following:
type NetworkInspectResp struct {
// Driver means the network's driver.
Driver string `json:"Driver,omitempty"`
// EnableIPv6 represents whether to enable IPv6.
EnableIPV6 bool `json:"EnableIPv6,omitempty"`
// ID uniquely identifies a network on a single machine
ID string `json:"ID,omitempty"`
Ⅰ. Issue Description
Use docker 1.12.6 docker_api_xxx_test.go to test the conformance of pouch API with docker 1.24 api version.
Ⅱ. Describe what happened
types/container.go
ID string
json:"ID,omitempty"
shoulde be Id in json
fixed in fix: make container ID json name compatible #1002
check port valid
req=&{Method:POST URL:/v1.24/containers/create Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[] Body:{Reader:{"Cmd":["/bin/sh","-c"," echo test"],"Image":"busybox","PortBindings":{"8080/tcp":[{"HostIP":"","HostPort":"aa80"}]}}
Request like above should not return
201
POST /containers/create with nil config, pouch return
400
,docker return500
POST /containers/create with multiple network, should return 400, now pouch return 201
req=&{Method:POST URL:/v1.24/containers/create Proto:HTTP/1.1 ProtoMajor:1 ProtoMinor:1 Header:map[] Body:{Reader:{"Image":"busybox","Netw orkingConfig":{"EndpointsConfig":{"net1":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"","Gateway":"","IPAdd ress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"","Time":0,"SkipResolver":false},"n et2":{"IPAMConfig":null,"Links":null,"Aliases":null,"NetworkID":"","EndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gatewa y":"","GlobalIPv6Address":"","GlobalIPv6PrefixLen":0,"MacAddress":"","Time":0,"SkipResolver":false},"net3":{"IPAMConfig":null,"Links":null ,"Aliases":null,"NetworkID":"","EndpointID":"","Gateway":"","IPAddress":"","IPPrefixLen":0,"IPv6Gateway":"","GlobalIPv6Address":"","Global IPv6PrefixLen":0,"MacAddress":"","Time":0,"SkipResolver":false}}}}
POST /container/create with nil content-type, docker return 500 while pouch return 201
the same for wrong content-type
POST /containers/create with invalid port syntax expect return 500, while return 201
the invalid syntax is as following:
DELETE URL:/v1.24/containers/ expect return 400, while it returns 500.
validate the resource in create, for example, the following create should return error.
exec in a paused conainer return 500, expect 409
GET URL:/v1.24/containers/logs_test/logs return 200, expect 400
GET URL:/v1.24/containers/nonExistentContainer/logs , get a nonexisting container return 200, expect 400.
no NetworkResouce types, and the following
json:ID
should beId
? this is covered in fix: make json ID be Id to be compatible #1066Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
pouch version
):uname -a
):The text was updated successfully, but these errors were encountered: