summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-07-14 09:09:01 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-07-14 09:09:01 -0400
commit199ce71ff2dfb2c32710c1bf39b72255f8427deb (patch)
tree4d42f6f7a3401e0144b8acc5971ebb4c66bfbcd3 /roles/lib_openshift/src
parentf51e0082fe17f14aec5e14facc143986f47cf260 (diff)
downloadopenshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.tar.gz
openshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.tar.bz2
openshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.tar.xz
openshift-199ce71ff2dfb2c32710c1bf39b72255f8427deb.zip
Fixed tests and added sleep for update.
Diffstat (limited to 'roles/lib_openshift/src')
-rw-r--r--roles/lib_openshift/src/class/oc_storageclass.py1
-rwxr-xr-xroles/lib_openshift/src/test/unit/test_oc_storageclass.py4
2 files changed, 3 insertions, 2 deletions
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),
])