diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/lib_openshift/library/oc_storageclass.py | 1 | ||||
-rw-r--r-- | roles/lib_openshift/src/class/oc_storageclass.py | 1 | ||||
-rwxr-xr-x | roles/lib_openshift/src/test/unit/test_oc_storageclass.py | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/roles/lib_openshift/library/oc_storageclass.py b/roles/lib_openshift/library/oc_storageclass.py index 5ca2e23a7..37c8f9ebc 100644 --- a/roles/lib_openshift/library/oc_storageclass.py +++ b/roles/lib_openshift/library/oc_storageclass.py @@ -1544,6 +1544,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/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), ]) |