1
0
mirror of https://gerrit.ovirt.org/vdsm synced 2026-02-05 12:46:23 +01:00
Files
vdsm/tests/start-container
Roman Bednar d30b794dba add helper script for running storage test env
Getting a container test environment is currently not straight forward.

Add a helper script which starts a container from existing image used
in CI, similar to what travis uses.

Currently the root permissions are unfortunately required in order to
set correct labels on /run/udev, runnning as regular user fails with:

Error: failed to set file label on /run/udev: operation not permitted

Tested with: podman-3.0.1-7.module+el8.4.0+11311+9da8acfb.x86_64

Signed-off-by: Roman Bednar <rbednar@redhat.com>
Change-Id: I3b8ac7d53d131329d660a4cf99def67286b5e105
2021-07-22 11:40:36 +00:00

19 lines
364 B
Bash
Executable File

#!/bin/sh
IMAGE="vdsm-test-centos-8"
REGISTRY="quay.io/ovirt"
# Setting labels on /run/udev requires root permissions.
if [ $(id -u) -ne 0 ]; then
echo "Need to be root!"
exit 1
fi
podman run \
--privileged \
--rm \
-it \
--volume $PWD:/vdsm:Z \
--volume /run/udev:/run/udev:Z \
$REGISTRY/$IMAGE \
/vdsm/tests/container-shell