set -xeuo pipefail
. "$KOLA_EXT_DATA/commonlib.sh"
run_as_core_user systemctl --user enable --now podman.socket
run_as_core_user podman system connection add --identity /home/core/.ssh/test_key con-rootless core@localhost
if ! run_as_core_user podman --connection con-rootless info; then
ausearch -m avc -ts recent || true
fatal "podman-remote SSH connection to localhost as core failed"
fi
ok "podman-remote SSH connection to localhost as core succeeded"
if is_fcos; then
run_as_core_user podman system connection add --identity /home/core/.ssh/test_key con-root root@localhost
if ! run_as_core_user podman --connection con-root info; then
ausearch -m avc -ts recent || true
fatal "podman-remote SSH connection to localhost as root failed"
fi
ok "podman-remote SSH connection to localhost as root succeeded"
fi