Skip to content

Commit

Permalink
CI: enable sqlite system tests
Browse files Browse the repository at this point in the history
In setup, write a containers.conf.d file with db_backend
as specified in .cirrus.yml.

This is actually much scarier and more achy-breaky than
merely "sqlite system tests": it enables sqlite in e2e
tests. ("But wait, we already do that!" -- no, not really.
sqlite in e2e is being done via --db-backend option, and
some podman commands in e2e do not use the standard options.
See #17904.

This is unlikely to get merged any time soon (March, maybe
even April) because sqlite is still too fragile; this will
trigger more flakes than are currently acceptable. Also,
the nasty auto-update flake seems to trigger much more
reliably with sqlite. We need that one fixed.

Signed-off-by: Ed Santiago <[email protected]>
  • Loading branch information
edsantiago committed Apr 12, 2023
1 parent d45ad05 commit f95276b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion contrib/cirrus/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ fi

cd "${GOSRC}/"

mkdir -p /etc/containers/containers.conf.d

# Defined by lib.sh: Does the host support cgroups v1 or v2? Use runc or crun
# respectively.
# **IMPORTANT**: $OCI_RUNTIME is a fakeout! It is used only in e2e tests.
Expand All @@ -84,7 +86,7 @@ case "$CG_FS_TYPE" in
if ((CONTAINER==0)); then
warn "Forcing testing with runc instead of crun"
echo "OCI_RUNTIME=runc" >> /etc/ci_environment
printf "[engine]\nruntime=\"runc\"\n" >>/etc/containers/containers.conf
printf "[engine]\nruntime=\"runc\"\n" > /etc/containers/containers.conf.d/90-runtime.conf
fi
;;
cgroup2fs)
Expand All @@ -93,6 +95,10 @@ case "$CG_FS_TYPE" in
*) die_unknown CG_FS_TYPE
esac

# Force the requested database backend without having to use command-line args
# shellcheck disable=SC2154
printf "[engine]\ndatabase_backend=\"$CI_DESIRED_DATABASE\"\n" > /etc/containers/containers.conf.d/92-db.conf

if ((CONTAINER==0)); then # Not yet running inside a container
# Discovered reemergence of BFQ scheduler bug in kernel 5.8.12-200
# which causes a kernel panic when system is under heavy I/O load.
Expand Down
1 change: 0 additions & 1 deletion test/system/005-info.bats
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ host.slirp4netns.executable | $expr_path
}

@test "podman info - confirm desired database" {
skip "FIXME: no way yet (2023-03-16) to override DB in system tests"
if [[ -z "$CI_DESIRED_DATABASE" ]]; then
# When running in Cirrus, CI_DESIRED_DATABASE *must* be defined
# in .cirrus.yml so we can double-check that all CI VMs are
Expand Down

0 comments on commit f95276b

Please sign in to comment.