Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

System tests: add :Z to volume mounts #10527

Merged
merged 1 commit into from
Jun 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,12 @@ json-file | f
echo "$randomcontent" > $testdir/content

# Workdir does not exist on the image but is volume mounted.
run_podman run --rm --workdir /IamNotOnTheImage -v $testdir:/IamNotOnTheImage $IMAGE cat content
run_podman run --rm --workdir /IamNotOnTheImage -v $testdir:/IamNotOnTheImage:Z $IMAGE cat content
is "$output" "$randomcontent" "cat random content"

# Workdir does not exist on the image but is created by the runtime as it's
# a subdir of a volume.
run_podman run --rm --workdir /IamNotOntheImage -v $testdir/content:/IamNotOntheImage/foo $IMAGE cat foo
run_podman run --rm --workdir /IamNotOntheImage -v $testdir/content:/IamNotOntheImage/foo:Z $IMAGE cat foo
is "$output" "$randomcontent" "cat random content"

# Make sure that running on a read-only rootfs works (#9230).
Expand Down Expand Up @@ -702,6 +702,8 @@ EOF
run_podman build -t nomtab $tmpdir
run_podman run --rm nomtab stat -c %N /etc/mtab
is "$output" "$expected" "/etc/mtab should be created"

run_podman rmi nomtab
}

# vim: filetype=sh
4 changes: 2 additions & 2 deletions test/system/500-networking.bats
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ load helpers
# Bind-mount this file with a different name to a container running httpd
run_podman run -d --name myweb -p "$HOST_PORT:80" \
--restart always \
-v $INDEX1:/var/www/index.txt \
-v $INDEX1:/var/www/index.txt:Z \
-w /var/www \
$IMAGE /bin/busybox-extras httpd -f -p 80
cid=$output
Expand Down Expand Up @@ -257,7 +257,7 @@ load helpers
# Bind-mount this file with a different name to a container running httpd
run_podman run -d --name myweb -p "$HOST_PORT:80" \
--network $netname \
-v $INDEX1:/var/www/index.txt \
-v $INDEX1:/var/www/index.txt:Z \
-w /var/www \
$IMAGE /bin/busybox-extras httpd -f -p 80
cid=$output
Expand Down