mirror of
https://github.com/containers/skopeo.git
synced 2025-09-01 14:47:10 +00:00
System tests - get working under podman-in-podman
Skopeo CI tests run under podman; hence the registries run in the tests will be podman-in-podman. This requires complex muckery to make work: - install bats, jq, and podman in the test image - add new test-system Make target. It runs podman with /var/lib/containers bind-mounted to a tmpdir and with other necessary options; and invokes a test script that hack-edits /etc/containers/storage.conf before running podman for the first time. - add --cgroup-manager=cgroupfs option to podman invocations in BATS: without this, podman-in-podman fails with: systemd cgroup flag passed, but systemd support for managing cgroups is not available Also: gpg --pinentry-mode option is not available on all our test platforms. Check for it before using. Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
18
hack/make/test-system
Executable file
18
hack/make/test-system
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Before running podman for the first time, make sure
|
||||
# to set storage to vfs (not overlay): podman-in-podman
|
||||
# doesn't work with overlay. And, disable mountopt,
|
||||
# which causes error with vfs.
|
||||
sed -i \
|
||||
-e 's/^driver\s*=.*/driver = "vfs"/' \
|
||||
-e 's/^mountopt/#mountopt/' \
|
||||
/etc/containers/storage.conf
|
||||
|
||||
# Build skopeo, install into /usr/bin
|
||||
make binary-local ${BUILDTAGS:+BUILDTAGS="$BUILDTAGS"}
|
||||
make install
|
||||
|
||||
# Run tests
|
||||
SKOPEO_BINARY=/usr/bin/skopeo bats --tap systemtest
|
Reference in New Issue
Block a user