diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-08-31 11:07:40 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-08-31 11:23:30 +0800 |
commit | f5afb93a4a2ed9547757655c1405ef27fabed11b (patch) | |
tree | 96a8e2c693951be6d0d59271e881efbdb8a63ca5 /cli/commands | |
parent | e1cf8564b1f06a64863ee463b817935ec58f834c (diff) |
unify testcases.yaml obtain process
hardcoded "''FUNCTEST_REPO + "/ci/testcases.yaml"''' appears wherever
testcases.yaml is needed, abstract a method to provide unified interface
JIRA: FUNCTEST-449
Change-Id: Ida8e3d90926d3e2245883a29f577ecb121bd5d6c
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'cli/commands')
-rw-r--r-- | cli/commands/cli_testcase.py | 4 | ||||
-rw-r--r-- | cli/commands/cli_tier.py | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/cli/commands/cli_testcase.py b/cli/commands/cli_testcase.py index abf67d19..d1b24829 100644 --- a/cli/commands/cli_testcase.py +++ b/cli/commands/cli_testcase.py @@ -21,8 +21,6 @@ import yaml with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f: functest_yaml = yaml.safe_load(f) -REPOS_DIR = os.getenv('repos_dir') -FUNCTEST_REPO = ("%s/functest/" % REPOS_DIR) FUNCTEST_CONF_DIR = functest_yaml.get("general").get( "directories").get("dir_functest_conf") ENV_FILE = FUNCTEST_CONF_DIR + "/env_active" @@ -33,7 +31,7 @@ class CliTestcase: def __init__(self): CI_INSTALLER_TYPE = os.getenv('INSTALLER_TYPE') CI_SCENARIO = os.getenv('DEPLOY_SCENARIO') - testcases = FUNCTEST_REPO + "/ci/testcases.yaml" + testcases = ft_utils.get_testcases_file() self.tiers = tb.TierBuilder(CI_INSTALLER_TYPE, CI_SCENARIO, testcases) def list(self): diff --git a/cli/commands/cli_tier.py b/cli/commands/cli_tier.py index 8e031cce..7797e9be 100644 --- a/cli/commands/cli_tier.py +++ b/cli/commands/cli_tier.py @@ -20,8 +20,6 @@ import yaml with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f: functest_yaml = yaml.safe_load(f) -REPOS_DIR = os.getenv('repos_dir') -FUNCTEST_REPO = ("%s/functest/" % REPOS_DIR) FUNCTEST_CONF_DIR = functest_yaml.get("general").get( "directories").get("dir_functest_conf") ENV_FILE = FUNCTEST_CONF_DIR + "/env_active" @@ -32,7 +30,7 @@ class CliTier: def __init__(self): CI_INSTALLER_TYPE = os.getenv('INSTALLER_TYPE') CI_SCENARIO = os.getenv('DEPLOY_SCENARIO') - testcases = FUNCTEST_REPO + "/ci/testcases.yaml" + testcases = ft_utils.get_testcases_file() self.tiers = tb.TierBuilder(CI_INSTALLER_TYPE, CI_SCENARIO, testcases) def list(self): |