summaryrefslogtreecommitdiff
path: root/test/apiv2/20-containers.at
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2021-07-29 08:34:49 -0700
committerJhon Honce <jhonce@redhat.com>2021-08-27 11:11:01 -0700
commita5adc3d80f7387c75c83f1e0c7ad3333fdc48806 (patch)
treeab45e953b5e89452a5b32a4c8c78c37c05f64923 /test/apiv2/20-containers.at
parent266a3892f25d8cee508f421e718ba6f135ff7123 (diff)
downloadpodman-a5adc3d80f7387c75c83f1e0c7ad3333fdc48806.tar.gz
podman-a5adc3d80f7387c75c83f1e0c7ad3333fdc48806.tar.bz2
podman-a5adc3d80f7387c75c83f1e0c7ad3333fdc48806.zip
Add support for mount options to API
When creating containers the specialized mount options where not populated via the API. Fixes: #10831 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'test/apiv2/20-containers.at')
-rw-r--r--test/apiv2/20-containers.at8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index e2eb94233..8fdecb4bd 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -366,4 +366,12 @@ t GET containers/$cid/json 200 \
.Config.Healthcheck.Timeout=30000000000 \
.Config.Healthcheck.Retries=3
+# compat api: Test for mount options support
+payload='{"Mounts":[{"Type":"tmpfs","Target":"/mnt/scratch","TmpfsOptions":{"SizeBytes":1024,"Mode":755}}]}'
+t POST containers/create Image=$IMAGE HostConfig="$payload" 201 .Id~[0-9a-f]\\{64\\}
+cid=$(jq -r '.Id' <<<"$output")
+t GET containers/$cid/json 200 \
+ .HostConfig.Tmpfs['"/mnt/scratch"']~.*size=1024.* \
+ .HostConfig.Tmpfs['"/mnt/scratch"']~.*mode=755.*
+
t DELETE containers/$cid?v=true 204