[lxc-devel] [lxd/master] tests: Fix pki with newer easyrsa
stgraber on Github
lxc-bot at linuxcontainers.org
Fri Aug 31 18:25:13 UTC 2018
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180831/6c2efe42/attachment.bin>
-------------- next part --------------
From 51cbd1cc0957e0fef99405c3805ca9caed36ad02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Fri, 31 Aug 2018 11:24:05 -0700
Subject: [PATCH] tests: Fix pki with newer easyrsa
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
test/suites/pki.sh | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/test/suites/pki.sh b/test/suites/pki.sh
index 2824bda443..26f52e1974 100644
--- a/test/suites/pki.sh
+++ b/test/suites/pki.sh
@@ -10,11 +10,22 @@ test_pki() {
set -e
cd "${TEST_DIR}/pki"
# shellcheck disable=SC1091
- . ./vars
- ./clean-all
- ./pkitool --initca
- ./pkitool --server 127.0.0.1
- ./pkitool lxd-client
+ if [ -e pkitool ]; then
+ . ./vars
+ ./clean-all
+ ./pkitool --initca
+ ./pkitool --server 127.0.0.1
+ ./pkitool lxd-client
+ else
+ ./easyrsa init-pki
+ echo "lxd" | ./easyrsa build-ca nopass
+ ./easyrsa build-server-full 127.0.0.1 nopass
+ ./easyrsa build-client-full lxd-client nopass
+ mkdir keys
+ cp pki/private/* keys/
+ cp pki/issued/* keys/
+ cp pki/ca.crt keys/
+ fi
)
# Setup the daemon
More information about the lxc-devel
mailing list