mirror of https://github.com/containers/podman.git
CI: system tests: parallelize low-hanging fruit
Add 'ci:parallel' tags to a few easy places. And, two small easily-reviewed safename or random-port additions. These have been working fine in #23275. I want to stop carrying them there so I can work on simplifying my PR. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
parent
8a516c7eb6
commit
bca7c20530
|
@ -196,6 +196,7 @@ function check_help() {
|
|||
}
|
||||
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman help - basic tests" {
|
||||
skip_if_remote
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
|
||||
load helpers
|
||||
|
||||
# All tests here can be run in parallel
|
||||
# bats file_tags=ci:parallel
|
||||
|
||||
@test "podman cp file from host to container" {
|
||||
srcdir=$PODMAN_TMPDIR/cp-test-file-host-to-ctr
|
||||
mkdir -p $srcdir
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
load helpers
|
||||
|
||||
# bats test_tags=distro-integration
|
||||
# bats test_tags=distro-integration, ci:parallel
|
||||
@test "podman exec - basic test" {
|
||||
rand_filename=$(random_string 20)
|
||||
rand_content=$(random_string 50)
|
||||
|
@ -47,7 +47,7 @@ load helpers
|
|||
run_podman rm $cid
|
||||
}
|
||||
|
||||
# bats test_tags=distro-integration
|
||||
# bats test_tags=distro-integration, ci:parallel
|
||||
@test "podman exec - leak check" {
|
||||
skip_if_remote "test is meaningless over remote"
|
||||
|
||||
|
@ -69,6 +69,7 @@ load helpers
|
|||
|
||||
# Issue #4785 - piping to exec statement - fixed in #4818
|
||||
# Issue #5046 - piping to exec truncates results (actually a conmon issue)
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman exec - cat from stdin" {
|
||||
run_podman run -d $IMAGE top
|
||||
cid="$output"
|
||||
|
@ -95,6 +96,7 @@ load helpers
|
|||
}
|
||||
|
||||
# #6829 : add username to /etc/passwd inside container if --userns=keep-id
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman exec - with keep-id" {
|
||||
skip_if_not_rootless "--userns=keep-id only works in rootless mode"
|
||||
# Multiple --userns options confirm command-line override (last one wins)
|
||||
|
@ -109,6 +111,7 @@ load helpers
|
|||
}
|
||||
|
||||
# #11496: podman-remote loses output
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman exec/run - missing output" {
|
||||
local bigfile=${PODMAN_TMPDIR}/bigfile
|
||||
local newfile=${PODMAN_TMPDIR}/newfile
|
||||
|
@ -136,6 +139,7 @@ load helpers
|
|||
run_podman rm -t 0 -f $cid
|
||||
}
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman run umask" {
|
||||
umask="0724"
|
||||
run_podman run --rm -q $IMAGE grep Umask /proc/self/status
|
||||
|
@ -162,6 +166,7 @@ load helpers
|
|||
run_podman rm -f -t0 $cid
|
||||
}
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman exec --tty" {
|
||||
# Run all tests, report failures at end
|
||||
defer-assertion-failures
|
||||
|
@ -173,7 +178,8 @@ load helpers
|
|||
if [[ -n "$run_term_env" ]]; then
|
||||
run_opt_env="--env=TERM=$run_term_env"
|
||||
fi
|
||||
run_podman run -d $run_opt_t $run_opt_env --name test $IMAGE top
|
||||
cname="c-${run_opt_t}-${run_term_env}-$(safename)"
|
||||
run_podman run -d $run_opt_t $run_opt_env --name $cname $IMAGE top
|
||||
|
||||
# Inner loops: different variations on EXEC
|
||||
for exec_opt_t in "" "-t"; do
|
||||
|
@ -196,16 +202,17 @@ load helpers
|
|||
fi
|
||||
|
||||
local desc="run $run_opt_t $run_opt_env, exec $exec_opt_t $exec_opt_env"
|
||||
TERM=exec-term run_podman exec $exec_opt_t $exec_opt_env test sh -c 'echo -n $TERM'
|
||||
TERM=exec-term run_podman exec $exec_opt_t $exec_opt_env $cname sh -c 'echo -n $TERM'
|
||||
assert "$output" = "$expected" "$desc"
|
||||
done
|
||||
done
|
||||
|
||||
run_podman rm -f -t0 test
|
||||
run_podman rm -f -t0 $cname
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman exec - does not leak session IDs on invalid command" {
|
||||
run_podman run -d $IMAGE top
|
||||
cid="$output"
|
||||
|
@ -222,6 +229,7 @@ load helpers
|
|||
}
|
||||
|
||||
# 'exec --preserve-fd' passes a list of additional file descriptors into the container
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman exec --preserve-fd" {
|
||||
skip_if_remote "preserve-fd is meaningless over remote"
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ SERVICE_TCP_HOST="localhost"
|
|||
SERVICE_FILE="$UNIT_DIR/$SERVICE_NAME.service"
|
||||
SOCKET_FILE="$UNIT_DIR/$SERVICE_NAME.socket"
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman system service - tcp CORS" {
|
||||
skip_if_remote "system service tests are meaningless over remote"
|
||||
PORT=$(random_free_port 63000-64999)
|
||||
|
@ -30,6 +31,7 @@ SOCKET_FILE="$UNIT_DIR/$SERVICE_NAME.socket"
|
|||
"podman warns about server on TCP"
|
||||
}
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman system service - tcp without CORS" {
|
||||
skip_if_remote "system service tests are meaningless over remote"
|
||||
PORT=$(random_free_port 63000-64999)
|
||||
|
@ -41,10 +43,15 @@ SOCKET_FILE="$UNIT_DIR/$SERVICE_NAME.socket"
|
|||
wait $podman_pid || true
|
||||
}
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman system service - CORS enabled in logs" {
|
||||
skip_if_remote "system service tests are meaningless over remote"
|
||||
run_podman system service --log-level="debug" --cors="*" -t 1
|
||||
|
||||
PORT=$(random_free_port 63000-64999)
|
||||
run_podman 0+w system service --log-level="debug" --cors="*" -t 1 tcp:$SERVICE_TCP_HOST:$PORT
|
||||
is "$output" ".*CORS Headers were set to ..\*...*" "debug log confirms CORS headers set"
|
||||
assert "$output" =~ "level=warning msg=\"Using the Podman API service with TCP sockets is not recommended" \
|
||||
"TCP socket warning"
|
||||
}
|
||||
|
||||
# vim: filetype=sh
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
load helpers
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman run, preserves initial --cgroup-manager" {
|
||||
skip_if_remote "podman-remote does not support --cgroup-manager"
|
||||
|
||||
|
@ -37,7 +38,7 @@ load helpers
|
|||
run_podman rm myc
|
||||
}
|
||||
|
||||
# bats test_tags=distro-integration
|
||||
# bats test_tags=distro-integration, ci:parallel
|
||||
@test "podman run --cgroups=disabled keeps the current cgroup" {
|
||||
skip_if_remote "podman-remote does not support --cgroups=disabled"
|
||||
skip_if_rootless_cgroupsv1
|
||||
|
|
|
@ -262,6 +262,7 @@ function _check_no_suggestions() {
|
|||
}
|
||||
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman shell completion test" {
|
||||
|
||||
random_container_name="c-$(safename)"
|
||||
|
@ -351,6 +352,7 @@ function _check_no_suggestions() {
|
|||
done
|
||||
}
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "podman shell completion for paths in container/image" {
|
||||
skip_if_remote "mounting via remote does not work"
|
||||
for cmd in create run; do
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
load helpers
|
||||
|
||||
|
||||
# bats test_tags=ci:parallel
|
||||
@test "options that cannot be set together" {
|
||||
skip_if_remote "not much point testing remote, and container-cleanup fails anyway"
|
||||
|
||||
|
|
Loading…
Reference in New Issue