diff options
Diffstat (limited to 'test/apiv2/44-mounts.at')
-rw-r--r-- | test/apiv2/44-mounts.at | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/apiv2/44-mounts.at b/test/apiv2/44-mounts.at index 5dc560852..d54669e7d 100644 --- a/test/apiv2/44-mounts.at +++ b/test/apiv2/44-mounts.at @@ -4,7 +4,12 @@ podman pull $IMAGE &>/dev/null # Test various HostConfig options tmpfs_name="/mytmpfs" -t POST containers/create?name=hostconfig_test '"Image":"'$IMAGE'","Cmd":["df"],"HostConfig":{"Binds":["/tmp/doesnotexist:/test1"],"TmpFs":{"'$tmpfs_name'":"rw"}}' 201 \ +t POST containers/create?name=hostconfig_test \ + Image=$IMAGE \ + Cmd='["df","-P","'$tmpfs_name'"]' \ + HostConfig='{"Binds":["/tmp/doesnotexist:/test1"]' \ + TmpFs="{\"$tmpfs_name\":\"rw\"}}" \ + 201 \ .Id~[0-9a-f]\\{64\\} cid=$(jq -r '.Id' <<<"$output") @@ -13,9 +18,14 @@ t GET containers/${cid}/json 200 \ .HostConfig.Tmpfs[\"${tmpfs_name}\"]~rw, # Run the container, verify output -t POST containers/${cid}/start '' 204 -t POST containers/${cid}/wait '' 200 +t POST containers/${cid}/start 204 +t POST containers/${cid}/wait 200 t GET containers/${cid}/logs?stdout=true 200 -like "$(<$WORKDIR/curl.result.out)" ".* ${tmpfs_name}" \ +# /logs returns application/octet-stream, which our test helper saves in +# an outfile rather than returning in $output. That's why we can't test +# this directly in the /logs test above; instead, we rely on knowing the +# path to the stored results. The 'tr' is needed because there may be +# null bytes in the outfile. +like "$(tr -d \\0 <$WORKDIR/curl.result.out)" ".* ${tmpfs_name}" \ "'df' output includes tmpfs name" |