diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-07-14 09:09:01 -0400 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2017-07-14 09:09:01 -0400 |
commit | 199ce71ff2dfb2c32710c1bf39b72255f8427deb (patch) | |
tree | 4d42f6f7a3401e0144b8acc5971ebb4c66bfbcd3 | |
parent | f51e0082fe17f14aec5e14facc143986f47cf260 (diff) | |
download | openshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.tar.gz openshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.tar.bz2 openshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.tar.xz openshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.zip |
Fixed tests and added sleep for update.
-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), ]) |