-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9512 from mheon/fix_9511
Fix parsing of Tmpfs field in compat create
- Loading branch information
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- sh -*- | ||
|
||
podman pull $IMAGE &>/dev/null | ||
|
||
# Test various HostConfig options | ||
tmpfs_name="/mytmpfs" | ||
t POST containers/create?name=hostconfig_test '"Image":"'$IMAGE'","Cmd":["df"],"HostConfig":{"TmpFs":{"'$tmpfs_name'":"rw"}}' 201 \ | ||
.Id~[0-9a-f]\\{64\\} | ||
cid=$(jq -r '.Id' <<<"$output") | ||
|
||
# Prior to #9512, the tmpfs would be called '/mytmpfs=rw', with the '=rw' | ||
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 GET containers/${cid}/logs?stdout=true 200 | ||
|
||
like "$(<$WORKDIR/curl.result.out)" ".* ${tmpfs_name}" \ | ||
"'df' output includes tmpfs name" |