Put TestResults.json in the right dir 37/54137/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Mon, 19 Mar 2018 21:35:10 +0000 (22:35 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Mon, 19 Mar 2018 21:50:26 +0000 (22:50 +0100)
https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/26/console

Change-Id: Icfdc0030d517b1885a94c2815aeb35257fdfd590
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/opnfv_tests/vnf/epc/juju_epc.py

index 58626ac..0f1ef48 100644 (file)
@@ -382,10 +382,10 @@ class JujuEpc(vnf.VnfOnBoarding):
         self.__logger.info("Getting results from Abot node....")
         os.system('juju scp abot-epc-basic/0:/var/lib/abot-'
                   'epc-basic/artifacts/TestResults.json {}/.'
-                  .format(self.case_dir))
+                  .format(self.res_dir))
         self.__logger.info("Parsing the Test results...")
-        res = (process_abot_test_result('{}/TestResults.'
-                                        'json'.format(self.case_dir)))
+        res = (process_abot_test_result('{}/TestResults.json'.format(
+            self.res_dir)))
         short_result = sig_test_format(res)
         self.__logger.info(short_result)
         self.details['test_vnf'].update(status='PASS',
@@ -402,10 +402,6 @@ class JujuEpc(vnf.VnfOnBoarding):
         """Clean created objects/functions."""
         try:
             if not self.orchestrator['requirements']['preserve_setup']:
-                self.__logger.info("Removing deployment files...")
-                testresult = os.path.join(self.case_dir, 'TestResults.json')
-                if os.path.exists(testresult):
-                    os.remove(testresult)
                 self.__logger.info("Destroying Orchestrator...")
                 os.system('juju destroy-controller -y abot-controller '
                           '--destroy-all-models')