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.