Functional tests to check recovery workflow details

Added functional tests for microversion 1.1 in which
notification returns recovery workflow details.

Change-Id: I6db5b1623672a2b9cba27277ddb7fb0e2534764b
This commit is contained in:
tpatil 2019-03-09 20:55:00 +09:00 committed by open
parent 41814ab45d
commit ab45ee1538
2 changed files with 41 additions and 1 deletions

View File

@ -92,3 +92,29 @@ class NotificationProcessTestCase(base.NotificationTestBase):
# Test to create notification for process with 'STARTED' event type
self._test_create_notification_event_start()
class NotificationProcessTestCase_V1_1(NotificationProcessTestCase):
def setUp(self):
super(NotificationProcessTestCase, self).setUp("1.1")
def test_create_notification_event_stopped(self):
# Test to create notification for process with 'STOPPED' event type
notification = self._test_create_notification_event_stopped()
self.assertIsNotNone(notification.recovery_workflow_details)
recovery_details = notification.recovery_workflow_details
# check the status of each task is successful
for details in recovery_details:
self.assertEqual("SUCCESS", details.state)
def test_create_notification_event_start(self):
# Test to create notification for process with 'STARTED' event type
notification = self._test_create_notification_event_start()
self.assertIsNotNone(notification.recovery_workflow_details)
recovery_details = notification.recovery_workflow_details
# check the status of each task is successful
for details in recovery_details:
self.assertEqual("SUCCESS", details.state)

View File

@ -23,7 +23,7 @@ class NotificationVMTestCase(base.NotificationTestBase):
NOTIFICATION_TYPE = "VM"
NOTIFICATION_WAIT_INTERVAL = 1
NOTIFICATION_WAIT_PERIOD = 300
NOTIFICATION_WAIT_PERIOD = 600
def setUp(self, ha_api_version="1.0"):
super(NotificationVMTestCase, self).setUp(ha_api_version)
@ -74,3 +74,17 @@ class NotificationVMTestCase(base.NotificationTestBase):
# Test to create notification for VM notification type
self._test_create_notification()
class NotificationVMTestCase_V1_1(NotificationVMTestCase):
def setUp(self):
super(NotificationVMTestCase, self).setUp("1.1")
def test_create_notification(self):
notification = self._test_create_notification()
self.assertIsNotNone(notification.recovery_workflow_details)
recovery_details = notification.recovery_workflow_details
# check the status of each task is successful
for details in recovery_details:
self.assertEqual("SUCCESS", details.state)