From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
Update tests to handle the changes in new 'raw' volume validation.
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
tests/test_model_storagevolume.py | 2 +-
tests/test_rest.py | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test_model_storagevolume.py b/tests/test_model_storagevolume.py
index 5e76d3d..82c38e2 100644
--- a/tests/test_model_storagevolume.py
+++ b/tests/test_model_storagevolume.py
@@ -253,7 +253,7 @@ class StorageVolumeTests(unittest.TestCase):
self.assertEquals(200, resp.status)
keys = [u'name', u'type', u'capacity',
u'allocation', u'path',
- u'used_by', u'format']
+ u'used_by', u'format', u'isvalid']
for vol in json.loads(resp.read()):
resp = self.request(uri + '/' + vol['name'])
self.assertEquals(200, resp.status)
diff --git a/tests/test_rest.py b/tests/test_rest.py
index 7e726b0..6c5c96d 100644
--- a/tests/test_rest.py
+++ b/tests/test_rest.py
@@ -594,6 +594,7 @@ class RestTests(unittest.TestCase):
self.assertEquals(200, resp.status)
# 'name' is required for this type of volume
+ open('/tmp/attach-volume', 'w').close()
req = json.dumps({'capacity': 1024,
'allocation': 512,
'type': 'disk',
@@ -659,6 +660,7 @@ class RestTests(unittest.TestCase):
rollback.prependDefer(self.request,
'/vms/test-vm/storages/hdx', '{}',
'DELETE')
os.remove('/tmp/existent.iso')
+ os.remove('/tmp/attach-volume')
# Change path of storage cdrom
cdrom =
u'http://mirrors.kernel.org/fedora/releases/21/Live/'\
--
2.4.3