aboutsummaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
Diffstat (limited to 'test/system')
-rw-r--r--test/system/030-run.bats2
-rw-r--r--test/system/045-start.bats2
-rw-r--r--test/system/065-cp.bats16
-rw-r--r--test/system/070-build.bats28
-rw-r--r--test/system/090-events.bats36
5 files changed, 83 insertions, 1 deletions
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index 9a136ff13..ccae703e5 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -14,7 +14,7 @@ load helpers
# ...but check the configured runtime engine, and switch to crun as needed
run_podman info --format '{{ .Host.OCIRuntime.Path }}'
if expr "$output" : ".*/crun"; then
- err_no_such_cmd="Error: executable file.* not found in \$PATH: No such file or directory: OCI not found"
+ err_no_such_cmd="Error: executable file.* not found in \$PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found"
err_no_exec_dir="Error: open executable: Operation not permitted: OCI permission denied"
fi
diff --git a/test/system/045-start.bats b/test/system/045-start.bats
index 542f9d1c2..3e0118dba 100644
--- a/test/system/045-start.bats
+++ b/test/system/045-start.bats
@@ -25,6 +25,8 @@ load helpers
die "podman start --all restarted a running container"
fi
+ run_podman wait $cid_none_implicit $cid_none_explicit $cid_on_failure
+
run_podman rm $cid_none_implicit $cid_none_explicit $cid_on_failure
run_podman stop -t 1 $cid_always
run_podman rm $cid_always
diff --git a/test/system/065-cp.bats b/test/system/065-cp.bats
index 679cdc209..24ac8118e 100644
--- a/test/system/065-cp.bats
+++ b/test/system/065-cp.bats
@@ -130,6 +130,22 @@ load helpers
}
+@test "podman cp file from/to host while --pid=host" {
+ if is_rootless && ! is_cgroupsv2; then
+ skip "'podman cp --pid=host' (rootless) only works with cgroups v2"
+ fi
+
+ srcdir=$PODMAN_TMPDIR/cp-pid-equals-host
+ mkdir -p $srcdir
+ touch $srcdir/hostfile
+
+ run_podman run --pid=host -d --name cpcontainer $IMAGE sleep infinity
+ run_podman cp $srcdir/hostfile cpcontainer:/tmp/hostfile
+ run_podman cp cpcontainer:/tmp/hostfile $srcdir/hostfile1
+ run_podman kill cpcontainer
+ run_podman rm -f cpcontainer
+}
+
@test "podman cp file from container to host" {
srcdir=$PODMAN_TMPDIR/cp-test-file-ctr-to-host
mkdir -p $srcdir
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index d2d56c051..0f3f3fa7f 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -766,6 +766,34 @@ EOF
is "$output" ".*/tmp/bogus: no such file or directory"
}
+@test "podman build COPY hardlinks " {
+ tmpdir=$PODMAN_TMPDIR/build-test
+ subdir=$tmpdir/subdir
+ subsubdir=$subdir/subsubdir
+ mkdir -p $subsubdir
+
+ dockerfile=$tmpdir/Dockerfile
+ cat >$dockerfile <<EOF
+FROM $IMAGE
+COPY . /test
+EOF
+ ln $dockerfile $tmpdir/hardlink1
+ ln $dockerfile $subdir/hardlink2
+ ln $dockerfile $subsubdir/hardlink3
+
+ run_podman build -t build_test $tmpdir
+ run_podman run --rm build_test stat -c '%i' /test/Dockerfile
+ dinode=$output
+ run_podman run --rm build_test stat -c '%i' /test/hardlink1
+ is "$output" "$dinode" "COPY hardlinks work"
+ run_podman run --rm build_test stat -c '%i' /test/subdir/hardlink2
+ is "$output" "$dinode" "COPY hardlinks work"
+ run_podman run --rm build_test stat -c '%i' /test/subdir/subsubdir/hardlink3
+ is "$output" "$dinode" "COPY hardlinks work"
+
+ run_podman rmi -f build_test
+}
+
function teardown() {
# A timeout or other error in 'build' can leave behind stale images
# that podman can't even see and which will cascade into subsequent
diff --git a/test/system/090-events.bats b/test/system/090-events.bats
index 8a9db41fa..19bee5506 100644
--- a/test/system/090-events.bats
+++ b/test/system/090-events.bats
@@ -25,3 +25,39 @@ load helpers
run_podman events --filter type=container --filter container=$cname --filter event=start --stream=false
is "$output" "$expect" "filtering just by label"
}
+
+@test "image events" {
+ skip_if_remote "FIXME: remove events on podman-remote seem to be broken"
+ pushedDir=$PODMAN_TMPDIR/dir
+ mkdir -p $pushedDir
+
+ tarball=$PODMAN_TMPDIR/ball.tar
+
+ run_podman image inspect --format "{{.ID}}" $IMAGE
+ imageID="$output"
+
+ t0=$(date --iso-8601=seconds)
+ tag=registry.com/$(random_string 10 | tr A-Z a-z)
+
+ # Force using the file backend since the journal backend is eating events
+ # (see containers/podman/pull/10219#issuecomment-842325032).
+ run_podman --events-backend=file push $IMAGE dir:$pushedDir
+ run_podman --events-backend=file save $IMAGE -o $tarball
+ run_podman --events-backend=file load -i $tarball
+ run_podman --events-backend=file pull docker-archive:$tarball
+ run_podman --events-backend=file tag $IMAGE $tag
+ run_podman --events-backend=file untag $IMAGE $tag
+ run_podman --events-backend=file tag $IMAGE $tag
+ run_podman --events-backend=file rmi $tag
+
+ run_podman --events-backend=file events --stream=false --filter type=image --since $t0
+ is "$output" ".*image push $imageID dir:$pushedDir
+.*image save $imageID $tarball
+.*image loadfromarchive *$tarball
+.*image pull *docker-archive:$tarball
+.*image tag $imageID $tag
+.*image untag $imageID $tag:latest
+.*image tag $imageID $tag
+.*image remove $imageID $tag.*" \
+ "podman events"
+}