Delete TestCase.create_snapshot() 23/49323/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Tue, 19 Dec 2017 18:12:27 +0000 (19:12 +0100)
committerCédric Ollivier <cedric.ollivier@orange.com>
Tue, 19 Dec 2017 18:12:27 +0000 (19:12 +0100)
OSGC has been removed then this method can be safely removed.
It also updates run_tests.py.

Change-Id: I4030b7f0351d24d095313ae990b08e65d8f69115
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/ci/run_tests.py
functest/core/testcase.py
functest/tests/unit/core/test_testcase.py

index 166dbfc..6748484 100644 (file)
@@ -137,9 +137,6 @@ class Runner(object):
                 test_dict = ft_utils.get_dict_by_test(test.get_name())
                 test_case = cls(**test_dict)
                 self.executed_test_cases[test.get_name()] = test_case
-                if self.clean_flag:
-                    if test_case.create_snapshot() != test_case.EX_OK:
-                        return testcase.TestCase.EX_RUN_ERROR
                 try:
                     kwargs = run_dict['args']
                     test_case.run(**kwargs)
index ae0da9d..fa38028 100644 (file)
@@ -178,17 +178,6 @@ class TestCase(object):
             self.__logger.exception("The results cannot be pushed to DB")
             return TestCase.EX_PUSH_TO_DB_ERROR
 
-    def create_snapshot(self):  # pylint: disable=no-self-use
-        """Save the testing environment before running test.
-
-        It can be overriden if resources must be listed running the
-        test case.
-
-        Returns:
-            TestCase.EX_OK
-        """
-        return TestCase.EX_OK
-
     def clean(self):
         """Clean the resources.
 
index 6fbf62e..73ed347 100644 (file)
@@ -223,10 +223,6 @@ class TestCaseTesting(unittest.TestCase):
         self.assertIn(duration, message)
         self.assertIn('FAIL', message)
 
-    def test_create_snapshot(self):
-        self.assertEqual(self.test.create_snapshot(),
-                         testcase.TestCase.EX_OK)
-
     def test_clean(self):
         self.assertEqual(self.test.clean(), None)