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:
parent
41814ab45d
commit
ab45ee1538
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue