From 4d128251dde429bbb0a6a6feead805e739bc344a Mon Sep 17 00:00:00 2001 From: Sergey Skripnick Date: Wed, 30 Sep 2015 14:55:11 +0300 Subject: [PATCH] Run test_task_samples in separate sqlite db Add optinal attribute 'force_new_db' to tests.functional.utils.Rally and use it. Change-Id: Ia7f0faedb5b5f6323c5e0ed00948b03a36e4f341 --- tests/functional/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/utils.py b/tests/functional/utils.py index 66fb9a93..06ac9245 100644 --- a/tests/functional/utils.py +++ b/tests/functional/utils.py @@ -72,7 +72,7 @@ class Rally(object): """ - def __init__(self, fake=False): + def __init__(self, fake=False, force_new_db=False): if not os.path.exists(DEPLOYMENT_FILE): subprocess.call("rally deployment config > %s" % DEPLOYMENT_FILE, shell=True) @@ -83,7 +83,7 @@ class Rally(object): self.env = copy.deepcopy(os.environ) self.env["HOME"] = self.tmp_dir - if "RCI_KEEP_DB" not in os.environ: + if force_new_db or ("RCI_KEEP_DB" not in os.environ): config_filename = os.path.join(self.tmp_dir, "conf") config = configparser.RawConfigParser() config.add_section("database")