From 199ce71ff2dfb2c32710c1bf39b72255f8427deb Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 14 Jul 2017 09:09:01 -0400 Subject: Fixed tests and added sleep for update. --- roles/lib_openshift/src/class/oc_storageclass.py | 1 + roles/lib_openshift/src/test/unit/test_oc_storageclass.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'roles/lib_openshift/src') diff --git a/roles/lib_openshift/src/class/oc_storageclass.py b/roles/lib_openshift/src/class/oc_storageclass.py index ece684c56..34ebf7c41 100644 --- a/roles/lib_openshift/src/class/oc_storageclass.py +++ b/roles/lib_openshift/src/class/oc_storageclass.py @@ -48,6 +48,7 @@ class OCStorageClass(OpenShiftCLI): self.delete() # pause here and attempt to wait for delete. # Better option would be to poll + import time time.sleep(5) return self.create() diff --git a/roles/lib_openshift/src/test/unit/test_oc_storageclass.py b/roles/lib_openshift/src/test/unit/test_oc_storageclass.py index f3cc4a76f..4fd02a8b1 100755 --- a/roles/lib_openshift/src/test/unit/test_oc_storageclass.py +++ b/roles/lib_openshift/src/test/unit/test_oc_storageclass.py @@ -87,7 +87,7 @@ class OCStorageClassTest(unittest.TestCase): # Making sure our mock was called as we expected mock_cmd.assert_has_calls([ - mock.call(['oc', 'get', 'sc', 'testsc', '-o', 'json'], None), + mock.call(['oc', 'get', 'storageclass', 'testsc', '-o', 'json'], None), mock.call(['oc', 'create', '-f', mock.ANY], None), - mock.call(['oc', 'get', 'sc', 'testsc', '-o', 'json'], None), + mock.call(['oc', 'get', 'storageclass', 'testsc', '-o', 'json'], None), ]) -- cgit v1.2.3