Merge pull request #29264 from rjfd/wip-dashboard-fix-qa-rbd

mgr/dashboard: qa: fix RBD test when matching error strings

Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2019-07-26 14:25:35 +08:00 committed by GitHub
commit d5ed1eaa1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,7 +353,7 @@ class RbdTest(DashboardTestCase):
res = self.create_image('rbd', 'test_rbd_twice', 10240)
self.assertStatus(400)
self.assertEqual(res, {"code": '17', 'status': 400, "component": "rbd",
"detail": "[errno 17] error creating image",
"detail": "[errno 17] RBD image already exists (error creating image)",
'task': {'name': 'rbd/create',
'metadata': {'pool_name': 'rbd',
'image_name': 'test_rbd_twice'}}})
@ -412,7 +412,7 @@ class RbdTest(DashboardTestCase):
res = self.remove_image('rbd', 'i_dont_exist')
self.assertStatus(400)
self.assertEqual(res, {u'code': u'2', "status": 400, "component": "rbd",
"detail": "[errno 2] error removing image",
"detail": "[errno 2] RBD image not found (error removing image)",
'task': {'name': 'rbd/delete',
'metadata': {'pool_name': 'rbd',
'image_name': 'i_dont_exist'}}})