From 7bdf10e68ba849c9314b3c139a434e27efd1e192 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 22 Feb 2021 21:38:56 +0100 Subject: test: Allow prefixing test names with 'tests/'. It's handy to be able to run `./test tests/accountd*` or similar. --- test | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test b/test index 81d910c..c1341e9 100755 --- a/test +++ b/test @@ -62,6 +62,7 @@ if [ $# -eq 0 ]; then done else for t in "$@"; do + t="${t#tests/}" if [ -f "tests/$t" ]; then TESTS+=( "$t" ) else -- cgit v1.2.3 From a3a7dd6780e77da26c25b026a4453f7f5b2c00ae Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 22 Feb 2021 22:09:11 +0100 Subject: test suite: Avoid setting twice the ACME API server URL. --- test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test b/test index c1341e9..5200974 100755 --- a/test +++ b/test @@ -34,6 +34,7 @@ usage() { # must be routed to this machine. # This can be done with a wildcard DNS record and opening tcp/80 in firewall. DOMAINNAME="lacme-test.guilhem.org" +ACMEAPI_SERVER="https://acme-staging-v02.api.letsencrypt.org/directory" MODE="dev" DISTRIBUTION="sid" @@ -117,7 +118,7 @@ run() { lacme_www_group=nogroup \ lacme_client_user=_lacme-client \ lacme_client_group=nogroup \ - acmeapi_server="https://acme-staging-v02.api.letsencrypt.org/directory" + acmeapi_server="$ACMEAPI_SERVER" CHROOT="$(schroot -c "$DISTRIBUTION-$ARCH-sbuild" -b)" rootdir="/run/schroot/mount/$CHROOT" @@ -168,8 +169,7 @@ run() { sudo install -oroot -groot -m0644 -vT "$BUILDDIR/certs-staging/ca-certificates.crt" \ "$rootdir/usr/share/lacme/ca-certificates.crt" sudo schroot -d"/" -c "$CHROOT" -r -- \ - sed -ri '0,/^#?server\s*=.*/ {s||server = https://acme-staging-v02.api.letsencrypt.org/directory|}' \ - /etc/lacme/lacme.conf + sed -ri "0,/^#?server\\s*=.*/ {s||server = $ACMEAPI_SERVER|}" /etc/lacme/lacme.conf # install account key and configure lacme accordingly sudo install -oroot -groot -m0600 -vT -- "$BUILDDIR/account.key" \ -- cgit v1.2.3