Fix broken volume and container tests

There are a handful of tests that aren't actually being run because
there are missing \ which is prevented the tests from being executed.
Additionally some of the test syntax was incorrect but not showing up
because these tests didn't run.

Signed-off-by: Alex Schultz <aschultz@redhat.com>
This commit is contained in:
Alex Schultz
2021-06-11 13:56:42 -06:00
parent 9d98f56a64
commit 6ced24d0b6
2 changed files with 6 additions and 9 deletions

View File

@ -211,15 +211,11 @@ t GET containers/$cid/json 200 \
t POST containers/create Image=$IMAGE Entrypoint='["top"]' 201 \ t POST containers/create Image=$IMAGE Entrypoint='["top"]' 201 \
.Id~[0-9a-f]\\{64\\} .Id~[0-9a-f]\\{64\\}
cid_top=$(jq -r '.Id' <<<"$output") cid_top=$(jq -r '.Id' <<<"$output")
network_expect="{}"
if root; then
network_expect='.podman.NetworkID=podman'
fi
t GET containers/${cid_top}/json 200 \ t GET containers/${cid_top}/json 200 \
.Config.Entrypoint[0]="top" \ .Config.Entrypoint[0]="top" \
.Config.Cmd='[]' \ .Config.Cmd='[]' \
.Path="top" .Path="top" \
.NetworkSettings.Networks="$network_expect" .NetworkSettings.Networks.podman.NetworkID=podman
t POST containers/${cid_top}/start 204 t POST containers/${cid_top}/start 204
# make sure the container is running # make sure the container is running
t GET containers/${cid_top}/json 200 \ t GET containers/${cid_top}/json 200 \

View File

@ -13,13 +13,14 @@ t POST libpod/volumes/create name=foo1 201 \
.CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \ .CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \
.Labels={} \ .Labels={} \
.Options={} .Options={}
# TODO(mwhahaha): there might be a bug here since options is null and not {}
t POST volumes/create 201 \ t POST volumes/create 201 \
.Name~[0-9a-f]\\{64\\} .Name~[0-9a-f]\\{64\\} \
.Driver=local \ .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\\}.* \ .CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.* \
.Labels={} \ .Labels={} \
.Options={} .Options=null
t POST libpod/volumes/create 201 t POST libpod/volumes/create 201
t POST libpod/volumes/create \ t POST libpod/volumes/create \
Name=foo2 \ Name=foo2 \