summaryrefslogtreecommitdiffstats
path: root/commands/storage
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2014-02-19 09:46:22 +0100
committerJan Safranek <jsafrane@redhat.com>2014-02-19 09:46:22 +0100
commitf4c7236e6abcf5c50802668ab7bbec6ef3095091 (patch)
tree52128ce779f327f9cdf185671c164aec1b65e2c1 /commands/storage
parentc7673497e2c7b95f6bfcbdf614bf378b22d6be41 (diff)
downloadopenlmi-scripts-f4c7236e6abcf5c50802668ab7bbec6ef3095091.tar.gz
openlmi-scripts-f4c7236e6abcf5c50802668ab7bbec6ef3095091.tar.xz
openlmi-scripts-f4c7236e6abcf5c50802668ab7bbec6ef3095091.zip
Add README and test runner for storage tests.
Diffstat (limited to 'commands/storage')
-rw-r--r--commands/storage/test/lmi/README.md28
-rwxr-xr-xcommands/storage/test/lmi/run.sh45
2 files changed, 73 insertions, 0 deletions
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 <jsafrane@redhat.com>
+
+# 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