tests: Add simple autopkgtest to check that ipa-server-install works.

This commit is contained in:
Timo Aaltonen
2016-10-05 00:35:50 +03:00
parent 0ef5833e32
commit 687414e8e7
3 changed files with 41 additions and 0 deletions

2
debian/changelog vendored
View File

@@ -8,6 +8,8 @@ freeipa (4.3.2-2) UNRELEASED; urgency=medium
#1628884)
* add-debian-platform.diff: Fix libsofthsm2.so install path.
* control: Bump dep on softhsm2 due to changed lib install path.
* tests: Add simple autopkgtest to check that ipa-server-install
works.
-- Timo Aaltonen <tjaalton@debian.org> Thu, 15 Sep 2016 23:41:03 +0300

7
debian/tests/control vendored Normal file
View File

@@ -0,0 +1,7 @@
Tests: server-install
Depends:
@,
Restrictions:
allow-stderr,
isolation-container,
needs-root,

32
debian/tests/server-install vendored Normal file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
# hack for lxc
IP=`ip route get 1.1.1.1 | awk '{print $NF; exit}'`
HOSTNAME=`cat /etc/hosts| grep '127.0.1.1' | awk '{print $NF; exit}'`
echo "$IP $HOSTNAME.debci $HOSTNAME" >> /etc/hosts
if [ ! -d /etc/systemd/system/pki-tomcatd.target.wants ]; then
echo "WHOOPS: Creating /etc/systemd/system/pki-tomcatd.target.wants"
mkdir /etc/systemd/system/pki-tomcatd.target.wants
fi
if [ ! -d /etc/systemd/system/pki-tomcatd-nuxwdog.target.wants ]; then
echo "WHOOPS: Creating /etc/systemd/system/pki-tomcatd-nuxwdog.target.wants"
mkdir /etc/systemd/system/pki-tomcatd-nuxwdog.target.wants
fi
ipa-server-install \
-U \
-r DEBCI \
-n debci \
-p Secret123 \
-a Secret123 \
--ip-address=$IP \
--setup-dns \
--no-forwarders \
--hostname=$HOSTNAME.debci
if [ $? != 0 ]; then
echo ">>>>> IPASERVER log >>>>>>>"
cat /var/log/ipaserver-install.log
fi