diff options
author | Matthew Heon <mheon@redhat.com> | 2021-06-07 13:36:08 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-06-07 14:14:57 -0400 |
commit | 260192670f9128438a39cf3d1de40a3d0bc8e9ee (patch) | |
tree | 37a7d87c3e6e2c496dd4493b7f45f15049ff302b /test | |
parent | cdf26a3d5677e0372e8892f85a8fd6065d512bcf (diff) | |
download | podman-260192670f9128438a39cf3d1de40a3d0bc8e9ee.tar.gz podman-260192670f9128438a39cf3d1de40a3d0bc8e9ee.tar.bz2 podman-260192670f9128438a39cf3d1de40a3d0bc8e9ee.zip |
Fix compat create with NetworkMode=default
The rework of namespace handling for rootless CNI broke this, as
CNI networks were being computed incorrectly. Fix handling of
CNI networks for the Compat Create REST API for containers, and
add a test so we don't regress again.
Fixes #10569
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/apiv2/20-containers.at | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at index a81210855..ef51757c9 100644 --- a/test/apiv2/20-containers.at +++ b/test/apiv2/20-containers.at @@ -341,3 +341,12 @@ t GET containers/$cid/json 200 \ .HostConfig.NanoCpus=500000 t DELETE containers/$cid?v=true 204 + +# Test Compat Create with default network mode (#10569) +t POST containers/create Image=$IMAGE HostConfig='{"NetworkMode":"default"}' 201 \ + .Id~[0-9a-f]\\{64\\} +cid=$(jq -r '.Id' <<<"$output") +t GET containers/$cid/json 200 \ + .HostConfig.NetworkMode="bridge" + +t DELETE containers/$cid?v=true 204 |