Refine fenix maintenance FT

* When testing any Fenix state, 'MAINTENANCE' state should come at first
  as the maintenance session opening, even though this does not make any
  difference to the test result right now.
* Reduce SCALE_SLEEP_TIME. As opposed to SCALE_WINDOW_SLEEP_TIME, we do
  not need such a long waiting duration bacause we're just waiting for
  DB updating, not VNF instance launch/destroy.
* Remove pointless sleep. Notice that test_vnf_alarm_maintenance is the
  most time-consuming FT at the moment.
* Add a reminder of migration testing.

Change-Id: Idd93a538c5479839fe865ad85555c952d276dfb2
This commit is contained in:
Koichiro Den 2020-11-11 20:09:55 +09:00
parent b1a02ec7d3
commit 611d649548
2 changed files with 6 additions and 4 deletions

View File

@ -21,7 +21,7 @@ VNF_CIRROS_DEAD_TIMEOUT = 500
ACTIVE_SLEEP_TIME = 3
DEAD_SLEEP_TIME = 1
SCALE_WINDOW_SLEEP_TIME = 120
SCALE_SLEEP_TIME = 120
SCALE_SLEEP_TIME = 30
NS_CREATE_TIMEOUT = 400
NS_DELETE_TIMEOUT = 300
NOVA_CLIENT_VERSION = 2

View File

@ -102,7 +102,9 @@ class VnfTestMaintenanceMonitor(base.BaseTackerTest):
time.sleep(constants.SCALE_SLEEP_TIME)
target_scaled = -1
if state == 'SCALE_IN':
if state == 'MAINTENANCE':
target_scaled = 0
elif state == 'SCALE_IN':
target_scaled = 1
_wait_vnf_active_and_assert_vdu_count(2, scale_type='in')
elif state == 'MAINTENANCE_COMPLETE':
@ -115,7 +117,7 @@ class VnfTestMaintenanceMonitor(base.BaseTackerTest):
self.assertEqual(int(scaled), target_scaled)
time.sleep(constants.SCALE_WINDOW_SLEEP_TIME)
time.sleep(constants.SCALE_WINDOW_SLEEP_TIME)
_request_maintenance_action('MAINTENANCE')
_request_maintenance_action('SCALE_IN')
_request_maintenance_action('MAINTENANCE_COMPLETE')
@ -187,8 +189,8 @@ class VnfTestMaintenanceMonitor(base.BaseTackerTest):
self.addCleanup(self.wait_until_vnf_delete, vnf_id,
constants.VNF_CIRROS_DELETE_TIMEOUT)
# TODO(kden): add a test for migration
def test_vnf_alarm_maintenance(self):
# instance_maintenance = self._get_instance_maintenance()
self._test_vnf_tosca_maintenance(
'sample-tosca-vnfd-maintenance.yaml',
'maintenance_vnf')