Skip to content

Commit

Permalink
Fix DB in podman acceptance test run
Browse files Browse the repository at this point in the history
  • Loading branch information
mcalmer committed Jan 18, 2024
1 parent c75036f commit ca39523
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion testsuite/podman_runner/03_run_controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ src_dir=$(cd $(dirname "$0")/../.. && pwd -P)

sudo -i podman run --rm -d --network uyuni-network-1 -v /tmp/test-all-in-one:/tmp --name controller-test -h controller-test -v ${src_dir}/testsuite:/testsuite ghcr.io/$UYUNI_PROJECT/uyuni/ci-test-controller-dev:$UYUNI_VERSION

podman ps
sudo podman ps
1 change: 1 addition & 0 deletions testsuite/podman_runner/08_manager_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -xe

src_dir=$(cd $(dirname "$0")/../.. && pwd -P)

sudo -i podman exec uyuni-server-all-in-one-test bash -c "/testsuite/podman_runner/provide-db-schema.sh"
sudo -i podman exec uyuni-server-all-in-one-test bash -c "/usr/lib/susemanager/bin/mgr-setup -l /var/log/susemanager_setup.log -s"
sudo -i podman exec uyuni-server-all-in-one-test bash -c "/usr/bin/spacewalk-schema-upgrade -y"

Expand Down
13 changes: 13 additions & 0 deletions testsuite/podman_runner/provide-db-schema.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#! /bin/bash

set -e

# we changed the schema dir, but we start with a schema which live still in the old location
# provide a symlink to make the tooling work
test -d /usr/share/susemanager/db || mkdir -p /usr/share/susemanager/db
if [ -d /etc/sysconfig/rhn/postgres -a ! -e /usr/share/susemanager/db/postgres ]; then
ln -s /etc/sysconfig/rhn/postgres /usr/share/susemanager/db/postgres
fi
if [ -d /etc/sysconfig/rhn/reportdb -a ! -e /usr/share/susemanager/db/reportdb ]; then
ln -s /etc/sysconfig/rhn/reportdb /usr/share/susemanager/db/reportdb
fi

0 comments on commit ca39523

Please sign in to comment.