From 16f7d75ac8e46a7905779931c871ac85c7e1aa04 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 21 Feb 2021 18:52:08 +0100 Subject: Add IPC tests with an old lacme(8) resp. lacme-accountd(1). --- tests/old-accountd | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/old-accountd (limited to 'tests/old-accountd') diff --git a/tests/old-accountd b/tests/old-accountd new file mode 100644 index 0000000..e7ccc0a --- /dev/null +++ b/tests/old-accountd @@ -0,0 +1,29 @@ +# IPC test between lacme(8) and ancient lacme-accountd(1) 0.2 from Debian jessie + +adduser --disabled-password \ + --home /home/lacme-account \ + --gecos "lacme account user" \ + --quiet lacme-account + +install -olacme-account -glacme-account -Ddm0700 -- ~lacme-account/.config/lacme +chown lacme-account: /etc/lacme/account.key + +cat >~lacme-account/.config/lacme/lacme-accountd.conf <<-EOF + privkey = file:/etc/lacme/account.key +EOF + +echo "deb http://deb.debian.org/debian stretch main" >>/etc/apt/sources.list +DEBIAN_FRONTEND="noninteractive" apt update +DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends --reinstall \ + -oDPkg::Options::="--force-confdef" -oDPkg::Options::="--force-overwrite" \ + lacme-accountd/stretch + +SOCKET=~lacme-account/S.lacme +runuser -u lacme-account -- lacme-accountd --socket="$SOCKET" & PID=$! +lacme --socket="$SOCKET" account +lacme --socket="$SOCKET" newOrder + +kill $PID +wait + +# vim: set filetype=sh : -- cgit v1.2.3 From 9a6a7824a009e1fb1f97afd227181191bc10f0a6 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 22 Feb 2021 02:43:48 +0100 Subject: Fix `./test --deb`. The staging environment wasn't set properly for the Debian packages. --- tests/old-accountd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/old-accountd') diff --git a/tests/old-accountd b/tests/old-accountd index e7ccc0a..b44f7ec 100644 --- a/tests/old-accountd +++ b/tests/old-accountd @@ -14,7 +14,8 @@ EOF echo "deb http://deb.debian.org/debian stretch main" >>/etc/apt/sources.list DEBIAN_FRONTEND="noninteractive" apt update -DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends --reinstall \ +DEBIAN_FRONTEND="noninteractive" apt install -y --no-install-recommends \ + --reinstall --allow-downgrades \ -oDPkg::Options::="--force-confdef" -oDPkg::Options::="--force-overwrite" \ lacme-accountd/stretch -- cgit v1.2.3