From 437eff6b6e7004d610f7267b2f074c1a3a191573 Mon Sep 17 00:00:00 2001 From: Adam Harwell Date: Thu, 7 Jun 2018 17:44:23 -0700 Subject: [PATCH] Spare amps have no role Change-Id: I8700be19f00a292c8b6069171fbdb7a47004a555 --- octavia_tempest_plugin/tests/scenario/v2/test_amphora.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py b/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py index 0a1d25aa..6435e7b7 100644 --- a/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py +++ b/octavia_tempest_plugin/tests/scenario/v2/test_amphora.py @@ -134,12 +134,14 @@ class AmphoraScenarioTest(test_base.LoadBalancerBaseTest): UUID(amp1[const.ID]) UUID(amp1[const.COMPUTE_ID]) UUID(amp1[const.VRRP_PORT_ID]) - self.assertIn(amp1[const.ROLE], const.AMPHORA_ROLES) self.assertIn(amp1[const.STATUS], const.AMPHORA_STATUSES) # We might have gotten unassigned/spare amps? if amp1[const.STATUS] == const.STATUS_ALLOCATED: UUID(amp1[const.HA_PORT_ID]) UUID(amp1[const.LOADBALANCER_ID]) + self.assertIn(amp1[const.ROLE], const.AMPHORA_ROLES) + else: + self.assertIsNone(amp1[const.ROLE]) # Test that all of the fields from the amp list match those from a show for field in const.SHOW_AMPHORA_RESPONSE_FIELDS: