From f4c7236e6abcf5c50802668ab7bbec6ef3095091 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Wed, 19 Feb 2014 09:46:22 +0100 Subject: Add README and test runner for storage tests. --- commands/storage/test/lmi/README.md | 28 +++++++++++++++++++++++ commands/storage/test/lmi/run.sh | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 commands/storage/test/lmi/README.md create mode 100755 commands/storage/test/lmi/run.sh (limited to 'commands/storage') diff --git a/commands/storage/test/lmi/README.md b/commands/storage/test/lmi/README.md new file mode 100644 index 0000000..5233301 --- /dev/null +++ b/commands/storage/test/lmi/README.md @@ -0,0 +1,28 @@ +Tests Description +================= +Tests for storage subcommand of lmi meta-command. + +Dependencies +------------ + * bash + * beakerlib + * openlmi-tools + * openlmi-scripts-storage, which will be tested + +Run +--- +Install and run any CIM broker on this or any remote host. Ensure that lmishell +can connect to it. Export these variables: + +Export these variables: + + * LMI_CIMOM_URL + * LMI_CIMOM_USERNAME + * LMI_CIMOM_PASSWORD + * LMI_STORAGE_DISK + * LMI_STORAGE_PARTITIONS + +See https://fedorahosted.org/openlmi/wiki/TestGuidelines for details. + +Execute: + $ ./run.sh diff --git a/commands/storage/test/lmi/run.sh b/commands/storage/test/lmi/run.sh new file mode 100755 index 0000000..52c3ee2 --- /dev/null +++ b/commands/storage/test/lmi/run.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# +# Copyright (C) 2014 Red Hat, Inc. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# The views and conclusions contained in the software and documentation are +# those of the authors and should not be interpreted as representing official +# policies, either expressed or implied, of the FreeBSD Project. +# +# Authors: Jan Safranek + +# Run all tests and report results + +. ./base.sh + +rlJournalStart + +for t in test_*.sh; do + rlPhaseStartTest "Testing $t" + rlRun "bash $t" + rlPhaseEnd +done + +rlJournalPrintText +rlJournalEnd -- cgit