From 2ea2a32f19385e91bfb2771796c58dde6d96431e Mon Sep 17 00:00:00 2001 From: Shishir Mahajan Date: Wed, 1 Mar 2017 14:28:31 -0500 Subject: [PATCH] Integration test: Create d-s-s config if it does not exist Signed-off-by: Shishir Mahajan Closes: #924 Approved by: rhatdan --- tests/integration/test_storage.sh | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/tests/integration/test_storage.sh b/tests/integration/test_storage.sh index d9ee7ff..f496d64 100755 --- a/tests/integration/test_storage.sh +++ b/tests/integration/test_storage.sh @@ -66,30 +66,22 @@ teardown () { setup trap teardown EXIT -# Running without /e/s/d-s-s should fail. +# If /etc/sysconfig/docker-storage-setup is missing, atomic should create the file. -set +e rm -f /etc/sysconfig/docker-storage-setup OUTPUT=$(${ATOMIC} storage modify --add-device $TEST_DEV_1 2>&1) -if [[ $? -eq 0 ]]; then - exit 1 -fi -set -e -echo $OUTPUT | grep -q "No such file or directory" +grep -q "^DEVS=\"$TEST_DEV_1\"$" /etc/sysconfig/docker-storage-setup if [ -n "$VGROUP" ]; then - cat >/etc/sysconfig/docker-storage-setup <>/etc/sysconfig/docker-storage-setup </dev/null||exit 1 [ $(pvs --noheadings -o vg_name $TEST_DEV_1_pvs) == $VGROUP ] - grep -q "^DEVS=\"$TEST_DEV_1\"$" /etc/sysconfig/docker-storage-setup # Removing it should undo all that.