Added few more stacky tests for glance
Added watch api tests for glance - both positive & negative Change-Id: Ie14df69897d08ea22051b599f4f16dc8dad0353d
This commit is contained in:
@@ -41,3 +41,21 @@ class GlanceStackTachTest(StackTachFixture):
|
||||
self.assertTrue('BAD REQUEST' in response.reason,
|
||||
msg="Expected the request to fail for reason: "
|
||||
"Bad Request, but it didn't")
|
||||
|
||||
def test_watch_events_with_invalid_deployment(self):
|
||||
"""
|
||||
@summary: Verify that Get Watch Events with
|
||||
Invalid Deployment ID fails
|
||||
"""
|
||||
|
||||
response = (self.stacktach_client
|
||||
.get_watch_events(service=self.service,
|
||||
deployment_id='aa'))
|
||||
self.assertFalse(response.ok,
|
||||
self.msg.format("status code",
|
||||
"Not a 2xx Success response",
|
||||
response.status_code, response.reason,
|
||||
response.content))
|
||||
resp_entity_obj = response.entity
|
||||
self.assertIsNone(resp_entity_obj,
|
||||
msg="The response entity is not NONE")
|
||||
|
||||
@@ -34,6 +34,18 @@ class GlanceStackTachTest(StackTachFixture):
|
||||
for element in response.entity:
|
||||
self.assertIsNotNone(element.host_name)
|
||||
|
||||
def test_get_watch_events(self):
|
||||
"""
|
||||
@summary: Verify that Get Watch Events returns 200 Success response
|
||||
"""
|
||||
response = (self.stacktach_client
|
||||
.get_watch_events(deployment_id='0',
|
||||
service=self.service))
|
||||
self.assertEqual(response.status_code, 200,
|
||||
self.msg.format("status code", 200,
|
||||
response.status_code, response.reason,
|
||||
response.content))
|
||||
|
||||
def test_get_event_id_details(self):
|
||||
"""
|
||||
@summary: Verify that Get Event ID Details returns 200 Success response
|
||||
|
||||
Reference in New Issue
Block a user