Stop reading NODE_NAME in tempest and refstack
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 13 Feb 2018 18:13:28 +0000 (19:13 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 14 Feb 2018 10:13:05 +0000 (11:13 +0100)
NODE_NAME should only be read by TestCase when publishing the results
to the database. Other debug data are already printed by run_tests.

INSTALLER_TYPE and DEPLOY_SCENARIO are also unused by refstack.

Change-Id: Ib82d5c1512553beba2c56f4ec2860cb2593f801e
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/opnfv_tests/openstack/refstack_client/refstack_client.py
functest/opnfv_tests/openstack/tempest/tempest.py

index cb2ba22..beb1a5a 100644 (file)
@@ -83,16 +83,6 @@ class RefstackClient(testcase.TestCase):
                options + ["--test-list", self.defcorelist])
         LOGGER.info("Starting Refstack_defcore test case: '%s'.", cmd)
 
-        with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
-                               "environment.log"), 'w+') as f_env:
-            f_env.write(
-                ("Refstack environment:\n"
-                 "  SUT: {}\n  Scenario: {}\n  Node: {}\n  Date: {}\n")
-                .format(os.getenv('INSTALLER_TYPE', None),
-                        os.getenv('DEPLOY_SCENARIO', None),
-                        os.getenv('NODE_NAME', 'unknown_pod'),
-                        time.strftime("%a %b %d %H:%M:%S %Z %Y")))
-
         with open(os.path.join(conf_utils.REFSTACK_RESULTS_DIR,
                                "refstack.log"), 'w+') as f_stdout:
             subprocess.call(cmd, shell=False, stdout=f_stdout,
index 01caf4f..56705fc 100644 (file)
@@ -164,21 +164,11 @@ class TempestCommon(testcase.TestCase):
         cmd.extend(self.option)
         LOGGER.info("Starting Tempest test suite: '%s'.", cmd)
 
-        header = ("Tempest environment:\n"
-                  "  SUT: %s\n  Scenario: %s\n  Node: %s\n  Date: %s\n" %
-                  (CONST.__getattribute__('INSTALLER_TYPE'),
-                   CONST.__getattribute__('DEPLOY_SCENARIO'),
-                   CONST.__getattribute__('NODE_NAME'),
-                   time.strftime("%a %b %d %H:%M:%S %Z %Y")))
-
         f_stdout = open(
             os.path.join(conf_utils.TEMPEST_RESULTS_DIR, "tempest.log"), 'w+')
         f_stderr = open(
             os.path.join(conf_utils.TEMPEST_RESULTS_DIR,
                          "tempest-error.log"), 'w+')
-        f_env = open(os.path.join(conf_utils.TEMPEST_RESULTS_DIR,
-                                  "environment.log"), 'w+')
-        f_env.write(header)
 
         proc = subprocess.Popen(
             cmd,
@@ -201,7 +191,6 @@ class TempestCommon(testcase.TestCase):
 
         f_stdout.close()
         f_stderr.close()
-        f_env.close()
 
     def parse_verifier_result(self):
         """Parse and save test results."""
@@ -246,7 +235,7 @@ class TempestCommon(testcase.TestCase):
         LOGGER.info("Tempest %s success_rate is %s%%",
                     self.case_name, self.result)
 
-    def run(self):
+    def run(self, **kwargs):
 
         self.start_time = time.time()
         try: