Skip to content

Commit 9d68546

Browse files
committed
Add agama integration test
The goal was to test apparmor profile, but apparently apparmor doesnt start anymore in containers
1 parent 310d1e6 commit 9d68546

4 files changed

Lines changed: 37 additions & 0 deletions

File tree

t/podman/lib/common.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ prepare_project() {
55
prj=$1
66
suff=$2
77

8+
test -z "$suff" || suff=-$suff
9+
810
(
911
cd /opt/openqa-trigger-from-obs
1012
mkdir -p $prj

t/podman/rest.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export METHOD=rest
22
set -e
33
script/openSUSE:Leap:15.2:Staging:A.sh
44
script/openSUSE:Leap:15.4:WSL.sh
5+
script/systemsmanagement:Agama:Devel.sh

t/podman/rsync.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ script/openSUSE:Leap:15.2:Staging:A.sh
44
script/openSUSE:Leap:15.2:ARM:ToTest.sh
55
script/openSUSE:Factory:ToTest.sh
66
script/openSUSE:Leap:15.4:WSL.sh
7+
script/systemsmanagement:Agama:Devel.sh
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!lib/test-in-container-systemd.sh
2+
3+
set -ex
4+
source lib/common.sh
5+
6+
# mock OBS backend folder
7+
mkdir -p /mockOBS/systemsmanagement:Agama:Devel/images/x86_64/agama-installer:openSUSE/
8+
mkdir -p /mockOBS/systemsmanagement:Agama:Devel/images/s390x/agama-installer:openSUSE/
9+
# create just empty files as at this point we are not interested about proper binaries
10+
touch /mockOBS/systemsmanagement:Agama:Devel/images/x86_64/agama-installer:openSUSE/agama-installer.x86_64-9.0.0-openSUSE-Build19.23.iso
11+
touch /mockOBS/systemsmanagement:Agama:Devel/images/x86_64/agama-installer:openSUSE/agama-installer.x86_64-9.0.0-openSUSE-Build19.23.iso.sha256
12+
touch /mockOBS/systemsmanagement:Agama:Devel/images/s390x/agama-installer:openSUSE/agama-installer.s390x-9.0.0-openSUSE-Build19.23.iso
13+
touch /mockOBS/systemsmanagement:Agama:Devel/images/s390x/agama-installer:openSUSE/agama-installer.s390x-9.0.0-openSUSE-Build19.23.iso.sha256
14+
15+
chown -R "$dbuser" /mockOBS
16+
17+
prepare_project systemsmanagement:Agama:Devel other
18+
19+
set -x
20+
21+
# make sure run did happen
22+
test -f /var/lib/openqa/factory/iso/agama-installer.s390x-9.0.0-openSUSE-Build19.23.iso
23+
test -f /var/lib/openqa/factory/repo/agama-installer.s390x-9.0.0-openSUSE-Build19.23.iso
24+
test -f /opt/openqa-trigger-from-obs/systemsmanagement:Agama:Devel/base/.run_last/openqa.cmd.log
25+
test -f /opt/openqa-trigger-from-obs/systemsmanagement:Agama:Devel/s390x/.run_last/openqa.cmd.log
26+
grep -q '"scheduled_product_id":1' /opt/openqa-trigger-from-obs/systemsmanagement:Agama:Devel/base/.run_last/openqa.cmd.log
27+
28+
[ "$METHOD" != rest ] || {
29+
state=$(echo "select state from minion_jobs where task='obs_rsync_run';" | su postgres -c "psql -t $dbname")
30+
test "$(echo $state)" == finished
31+
}
32+
33+
echo PASS ${BASH_SOURCE[0]} $TESTCASE $METHOD

0 commit comments

Comments
 (0)