Commit b2edf95a authored by Samuel GAIST's avatar Samuel GAIST

[utils][tests][scheduling] Add a couple of tests using databases v2

This ensure that the infrastructure still
runs properly with both types of databases.
parent e94ece4d
......@@ -336,6 +336,7 @@ class TestDockerExecution(TestSchedulerBase):
import subprocess
for version in range(1, 3):
subprocess.run(
[
"./bin/beat",
......@@ -345,7 +346,7 @@ class TestDockerExecution(TestSchedulerBase):
settings.PREFIX,
"databases",
"index",
"simple_rawdata_access/1",
f"simple_rawdata_access/{version}",
"--docker",
],
check=True,
......@@ -355,8 +356,9 @@ class TestDockerExecution(TestSchedulerBase):
self.check_worker_status("node1", True)
def test_database_rawdata_access_experiment(self):
for name in ["single_rawdata_access", "single_rawdata_access_db_v2"]:
fullname = "user/user/single/1/single_rawdata_access"
with self.subTest(experiment_name=fullname):
xp = Experiment.objects.get(name=fullname.split("/")[-1])
schedule_experiment(xp)
......@@ -384,8 +386,9 @@ class TestExecution(TestSchedulerBase):
self.check_worker_status("node2", True)
def test_successful_experiment(self):
fullname = "user/user/double/1/double"
for name in ["double", "double_db_v2"]:
fullname = f"user/user/double/1/{name}"
with self.subTest(experiment_name=fullname):
xp = Experiment.objects.get(name=fullname.split("/")[-1])
self.prepare_databases(xp.declaration)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment