summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2012-12-10 12:52:32 +0100
committerJan Safranek <jsafrane@redhat.com>2012-12-10 12:52:32 +0100
commit05da4d1434b1f8db7091a276c57e982489667622 (patch)
treeb95df115748ebacd128365d7882f3dfee346eb4c
parent33f9e43abc105f8597179bb5c4ad422a2dd4b2f6 (diff)
parentc0cadb3bc6b9fcdcf191fe661104cf9f35c60e95 (diff)
downloadopenlmi-providers-05da4d1434b1f8db7091a276c57e982489667622.tar.gz
openlmi-providers-05da4d1434b1f8db7091a276c57e982489667622.tar.xz
openlmi-providers-05da4d1434b1f8db7091a276c57e982489667622.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/openlmi-providers
-rw-r--r--src/software/test/README8
-rwxr-xr-xsrc/software/test/run.py (renamed from src/software/test/run_tests.py)0
-rwxr-xr-xsrc/software/test/test_software_file_check.py12
3 files changed, 10 insertions, 10 deletions
diff --git a/src/software/test/README b/src/software/test/README
index a64382d..e2b3cc6 100644
--- a/src/software/test/README
+++ b/src/software/test/README
@@ -1,4 +1,4 @@
-Tests must be run as root on machine with sfcbd broker.
+Tests must be run as root on machine with cimom broker.
There are number of environment variables, that affect test running:
LMI_CIMOM_USERNAME
LMI_CIMOM_PASSWORD
@@ -15,12 +15,12 @@ There are number of environment variables, that affect test running:
complete
Simple usage:
- Each test module can be run as a stand-alone script or with run_tests.py
+ Each test module can be run as a stand-alone script or with run.py
script:
- $ ./run_tests.py -c --cache-dir=/var/tmp
+ $ ./run.py -c --cache-dir=/var/tmp
To pass any arguments to underlying unittest.main() function, append them
after "--" swith like this:
- $ ./run_tests.py -c --cache-dir=/var/tmp -- -v TestSoftwarePackage
+ $ ./run.py -c --cache-dir=/var/tmp -- -v TestSoftwarePackage
All environment variables defined above can be overriden by command-line
arguments.
diff --git a/src/software/test/run_tests.py b/src/software/test/run.py
index 002bf77..002bf77 100755
--- a/src/software/test/run_tests.py
+++ b/src/software/test/run.py
diff --git a/src/software/test/test_software_file_check.py b/src/software/test/test_software_file_check.py
index cb09282..d44fd10 100755
--- a/src/software/test/test_software_file_check.py
+++ b/src/software/test/test_software_file_check.py
@@ -136,7 +136,7 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
return RE_CHECKSUM.match(subprocess.check_output([
self.hash_num2cmd[csumnum], filename])).group(1).lower()
- def do_test_symlink(self, filepath, inst):
+ def do_check_symlink(self, filepath, inst):
"""
Assert some details about symlink.
"""
@@ -199,7 +199,7 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
self.assertTrue(cur_pflags.gid)
self.assertTrue(cur_pflags.mtime)
- def do_test_directory(self, filepath, inst):
+ def do_check_directory(self, filepath, inst):
"""
Assert some details about directory.
"""
@@ -216,7 +216,7 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
self.assertEqual(inst["LastModificationTime"],
int(stats.st_mtime))
- def do_test_file(self, filepath, inst):
+ def do_check_file(self, filepath, inst):
"""
Assert some details about regurar file.
"""
@@ -340,11 +340,11 @@ class TestSoftwareFileCheck(common.SoftwareBaseTestCase):
, "FileChecksum", "FileModeFlags"):
self.assertEqual(inst["Expected"+prop], inst[prop])
if os.path.islink(filepath):
- self.do_test_symlink(filepath, inst)
+ self.do_check_symlink(filepath, inst)
elif os.path.isdir(filepath):
- self.do_test_directory(filepath, inst)
+ self.do_check_directory(filepath, inst)
elif os.path.isfile(filepath):
- self.do_test_file(filepath, inst)
+ self.do_check_file(filepath, inst)
@common.mark_dangerous
def test_invoke_method(self):