Skip to content

Commit

Permalink
Merge pull request #10662 from mwhahaha/fix-apiv2-tests
Browse files Browse the repository at this point in the history
Fix broken volume and container tests
  • Loading branch information
openshift-merge-robot authored Jul 14, 2021
2 parents ace19c7 + 6ced24d commit 9570bf6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 2 additions & 6 deletions test/apiv2/20-containers.at
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,11 @@ t GET containers/$cid/json 200 \
t POST containers/create Image=$IMAGE Entrypoint='["top"]' 201 \
.Id~[0-9a-f]\\{64\\}
cid_top=$(jq -r '.Id' <<<"$output")
network_expect="{}"
if root; then
network_expect='.podman.NetworkID=podman'
fi
t GET containers/${cid_top}/json 200 \
.Config.Entrypoint[0]="top" \
.Config.Cmd='[]' \
.Path="top"
.NetworkSettings.Networks="$network_expect"
.Path="top" \
.NetworkSettings.Networks.podman.NetworkID=podman
t POST containers/${cid_top}/start 204
# make sure the container is running
t GET containers/${cid_top}/json 200 \
Expand Down
7 changes: 4 additions & 3 deletions test/apiv2/30-volumes.at
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ t POST libpod/volumes/create name=foo1 201 \
.CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \
.Labels={} \
.Options={}
# TODO(mwhahaha): there might be a bug here since options is null and not {}
t POST volumes/create 201 \
.Name~[0-9a-f]\\{64\\}
.Name~[0-9a-f]\\{64\\} \
.Driver=local \
.Mountpoint=$volumepath/~[0-9a-f]\\{64\\}/_data \
.Mountpoint~$volumepath/[0-9a-f]\\{64\\}/_data \
.CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \
.Labels={} \
.Options={}
.Options=null
t POST libpod/volumes/create 201
t POST libpod/volumes/create \
Name=foo2 \
Expand Down

0 comments on commit 9570bf6

Please sign in to comment.