diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-09-22 15:03:52 +0100 |
---|---|---|
committer | Martin Klozik <martinx.klozik@intel.com> | 2016-10-03 14:47:46 +0100 |
commit | e2e6c855327ec2d0a21c4cf172c92d82948ed5d4 (patch) | |
tree | 43c7655f17bbedf3449019c194062a870641705a /testcases/integration.py | |
parent | 5b7cf3e52902ca12d2c61aaa34761454ee0e5bf9 (diff) |
bugfix: Correct VM handling by integration tests
Patch with multi VM support has changed the way
how data are copied into the shared folder. Also
new support of GUEST_ options expansion requires
proper initialization with exact number of VMs
involved in the test.
Code of class specific to integration tests
was updated to initialize both GUEST_ options
and VM shared dir correctly.
Original values of all GUEST_ options are restored
after the testcase execution. So other TCs can
use original values for configuration expansion
to required number of VMs.
JIRA: VSPERF-361
Change-Id: Ic1149fbc73f73a66982bb64173b2217e55597200
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Bill Michalowski <bmichalo@redhat.com>
Reviewed-by: Antonio Fischetti <antonio.fischetti@intel.com>
Diffstat (limited to 'testcases/integration.py')
-rw-r--r-- | testcases/integration.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/testcases/integration.py b/testcases/integration.py index f3f684ba..88a6f12c 100644 --- a/testcases/integration.py +++ b/testcases/integration.py @@ -114,7 +114,20 @@ class IntegrationTestCase(TestCase): loader = Loader() # execute test based on TestSteps definition if self.test: + # initialize list with results step_result = [None] * len(self.test) + + # count how many VNFs are involved in the test + for step in self.test: + if step[0].startswith('vnf'): + vnf_list[step[0]] = None + + # check/expand GUEST configuration and copy data to shares + if len(vnf_list): + S.check_vm_settings(len(vnf_list)) + self._copy_fwd_tools_for_all_guests(len(vnf_list)) + + # run test step by step... for i, step in enumerate(self.test): step_ok = False if step[0] == 'vswitch': @@ -132,10 +145,9 @@ class IntegrationTestCase(TestCase): tmp_traffic.update(step[2]) step[2] = tmp_traffic elif step[0].startswith('vnf'): - if not step[0] in vnf_list: - # initialize new VM and copy data to its shared dir + if not vnf_list[step[0]]: + # initialize new VM vnf_list[step[0]] = loader.get_vnf_class()() - self._copy_fwd_tools_for_guest(len(vnf_list)) test_object = vnf_list[step[0]] else: self._logger.error("Unsupported test object %s", step[0]) |