aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-12-05 10:20:55 +0000
committerCédric Ollivier <cedric.ollivier@orange.com>2017-12-12 21:43:12 +0100
commit8f0134178d24b7b478beb22395c448cf76e381f2 (patch)
treec10a4d82cf2cce3465aa834956bc6dc16839dc2a /functest/ci
parent5ed771a9a0dbc09610ecc900c0c3e86edc08eee6 (diff)
All patching config files in memory
It adds the yaml content as Config attribute and allow patching it without modifying the file (and reimport constants or config). It also removes obsolete data in config_patch.yaml and moves several functions in the right modules (Config) JIRA: ARMBAND-334 Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I5c9a574d3283828063154c977cdfbc2abfdc6777 Signed-off-by: Linda Wang <wangwulin@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/ci')
-rw-r--r--functest/ci/config_patch.yaml3
-rw-r--r--functest/ci/run_tests.py35
2 files changed, 0 insertions, 38 deletions
diff --git a/functest/ci/config_patch.yaml b/functest/ci/config_patch.yaml
index f54c2d7c..b6ba9790 100644
--- a/functest/ci/config_patch.yaml
+++ b/functest/ci/config_patch.yaml
@@ -6,9 +6,6 @@ lxd:
image_file_name: cirros-0.3.5-x86_64-lxc.tar.gz
image_disk_format: raw
- healthcheck:
- disk_image: /home/opnfv/functest/data/cirros-0.3.5-x86_64-lxc.tar.gz
- disk_format: raw
fdio:
general:
flavor_extra_specs: {'hw:mem_page_size':'large'}
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index 67a6f142..b8da3be6 100644
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -20,7 +20,6 @@ import textwrap
import prettytable
import six
-import yaml
import functest.ci.tier_builder as tb
import functest.core.testcase as testcase
@@ -33,13 +32,6 @@ logger = logging.getLogger('functest.ci.run_tests')
CONFIG_FUNCTEST_PATH = pkg_resources.resource_filename(
'functest', 'ci/config_functest.yaml')
-CONFIG_PATCH_PATH = pkg_resources.resource_filename(
- 'functest', 'ci/config_patch.yaml')
-CONFIG_AARCH64_PATCH_PATH = pkg_resources.resource_filename(
- 'functest', 'ci/config_aarch64_patch.yaml')
-# set the architecture to default
-pod_arch = os.getenv("POD_ARCH", None)
-arch_filter = ['aarch64']
class Result(enum.Enum):
@@ -88,31 +80,6 @@ class Runner(object):
pkg_resources.resource_filename('functest', 'ci/testcases.yaml'))
@staticmethod
- def update_config_file():
- Runner.patch_file(CONFIG_PATCH_PATH)
-
- if pod_arch and pod_arch in arch_filter:
- Runner.patch_file(CONFIG_AARCH64_PATCH_PATH)
-
- @staticmethod
- def patch_file(patch_file_path):
- logger.debug('Updating file: %s', patch_file_path)
- with open(patch_file_path) as f:
- patch_file = yaml.safe_load(f)
-
- updated = False
- for key in patch_file:
- if key in CONST.__getattribute__('DEPLOY_SCENARIO'):
- new_functest_yaml = dict(ft_utils.merge_dicts(
- ft_utils.get_functest_yaml(), patch_file[key]))
- updated = True
-
- if updated:
- os.remove(CONFIG_FUNCTEST_PATH)
- with open(CONFIG_FUNCTEST_PATH, "w") as f:
- f.write(yaml.dump(new_functest_yaml, default_style='"'))
-
- @staticmethod
def source_rc_file():
rc_file = CONST.__getattribute__('openstack_creds')
if not os.path.isfile(rc_file):
@@ -229,8 +196,6 @@ class Runner(object):
self.run_tier(tier)
def main(self, **kwargs):
- Runner.update_config_file()
-
if 'noclean' in kwargs:
self.clean_flag = not kwargs['noclean']
if 'report' in kwargs: