[lxc-devel] [lxd/master] tests: Fix pool conflict in preseed
stgraber on Github
lxc-bot at linuxcontainers.org
Sun Feb 25 21:08:15 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/20180225/c087c39c/attachment.bin>
-------------- next part --------------
From fd96e51d3f1a5d0c207fe01b6f5995c965f5172d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sun, 25 Feb 2018 15:56:38 -0500
Subject: [PATCH] tests: Fix pool conflict in preseed
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/init_preseed.sh | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/test/suites/init_preseed.sh b/test/suites/init_preseed.sh
index 4245ac596..066aab440 100644
--- a/test/suites/init_preseed.sh
+++ b/test/suites/init_preseed.sh
@@ -10,6 +10,7 @@ test_init_preseed() {
# shellcheck disable=SC2034
LXD_DIR=${LXD_INIT_DIR}
+ storage_pool="lxdtest-$(basename "${LXD_DIR}")-data"
# In case we're running against the ZFS backend, let's test
# creating a zfs storage pool, otherwise just use dir.
if [ "$lxd_backend" = "zfs" ]; then
@@ -31,7 +32,7 @@ config:
core.https_address: 127.0.0.1:9999
images.auto_update_interval: 15
storage_pools:
-- name: data
+- name: ${storage_pool}
driver: $driver
config:
source: $source
@@ -46,7 +47,7 @@ profiles:
devices:
root:
path: /
- pool: data
+ pool: ${storage_pool}
type: disk
- name: test-profile
description: "Test profile"
@@ -63,17 +64,17 @@ EOF
lxc info | grep -q 'core.https_address: 127.0.0.1:9999'
lxc info | grep -q 'images.auto_update_interval: "15"'
lxc network list | grep -q "lxdt$$"
- lxc storage list | grep -q "data"
- lxc storage show data | grep -q "$source"
+ lxc storage list | grep -q "${storage_pool}"
+ lxc storage show "${storage_pool}" | grep -q "$source"
lxc profile list | grep -q "test-profile"
- lxc profile show default | grep -q "pool: data"
+ lxc profile show default | grep -q "pool: ${storage_pool}"
lxc profile show test-profile | grep -q "limits.memory: 2GB"
lxc profile show test-profile | grep -q "nictype: bridged"
lxc profile show test-profile | grep -q "parent: lxdt$$"
lxc profile delete default
lxc profile delete test-profile
lxc network delete lxdt$$
- lxc storage delete data
+ lxc storage delete "${storage_pool}"
if [ "$lxd_backend" = "zfs" ]; then
# shellcheck disable=SC2154
More information about the lxc-devel
mailing list