summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-02-22 15:08:40 +0100
committerValentin Rothberg <rothberg@redhat.com>2021-02-22 16:45:30 +0100
commit8577be72e8ec7fa597c7196bca0705d2c66083e0 (patch)
treeced9c1306f672f02954bd0c9ef0b60e4ded98484 /test
parent10d52c05e23e75b9c608e100999cb55334732525 (diff)
downloadpodman-8577be72e8ec7fa597c7196bca0705d2c66083e0.tar.gz
podman-8577be72e8ec7fa597c7196bca0705d2c66083e0.tar.bz2
podman-8577be72e8ec7fa597c7196bca0705d2c66083e0.zip
podman cp: treat /dev/stdout correctly
/dev/stdout should not be treated as "-" to remain compatible with Docker and to have a more consistent and idiomatic interface. Fixes: #9362 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/065-cp.bats4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index 0fcc437d4..87a961160 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -508,6 +508,10 @@ load helpers
run_podman exec cpcontainer sh -c "echo '$rand_content' > /tmp/file.txt"
run_podman exec cpcontainer touch /tmp/empty.txt
+ # Make sure that only "-" gets special treatment. "/dev/stdout"
+ run_podman 125 cp cpcontainer:/tmp/file.txt /dev/stdout
+ is "$output" 'Error: invalid destination: "/dev/stdout" must be a directory or a regular file'
+
# Copying from stdout will always compress. So let's copy the previously
# created file from the container via stdout, untar the archive and make
# sure the file exists with the expected content.