diff --git a/test/admin_test.py b/test/admin_test.py index 2886e6d51..c58aa687a 100644 --- a/test/admin_test.py +++ b/test/admin_test.py @@ -2,7 +2,7 @@ from proxysql_base_test import ProxySQLBaseTest class AdminTest(ProxySQLBaseTest): - DOCKER_COMPOSE_FILE = "./scenarios/1backend" + SCENARIO = "./scenarios/1backend" def test_stop_main_thread(self): # This test will just assert that PROXYSQL STOP works correctly diff --git a/test/authentication_test.py b/test/authentication_test.py index 7322b5462..38808e59f 100644 --- a/test/authentication_test.py +++ b/test/authentication_test.py @@ -6,7 +6,7 @@ from proxysql_base_test import ProxySQLBaseTest class AuthenticationTest(ProxySQLBaseTest): - DOCKER_COMPOSE_FILE = "./scenarios/1backend" + SCENARIO = "./scenarios/1backend" def test_existing_user_with_correct_password_works(self): version1 = ProxySQLBaseTest.run_query_mysql( diff --git a/test/one_backend_test.py b/test/one_backend_test.py index 828d8a3bc..67219446e 100644 --- a/test/one_backend_test.py +++ b/test/one_backend_test.py @@ -4,7 +4,7 @@ from proxysql_base_test import ProxySQLBaseTest class OneBackendTest(ProxySQLBaseTest): - DOCKER_COMPOSE_FILE = "./scenarios/1backend" + SCENARIO = "./scenarios/1backend" def test_select_strings_returns_correct_result(self): diff --git a/test/proxysql_base_test.py b/test/proxysql_base_test.py index 7698ed1da..50a16218b 100644 --- a/test/proxysql_base_test.py +++ b/test/proxysql_base_test.py @@ -15,7 +15,7 @@ from proxysql_tests_config import ProxySQL_Tests_Config class ProxySQLBaseTest(TestCase): - DOCKER_COMPOSE_FILE = None + SCENARIO = None # TODO(andrei): make it possible to set this to False, and make False # the default value. INTERACTIVE_TEST = True @@ -25,26 +25,26 @@ class ProxySQLBaseTest(TestCase): """Start up all the docker services necessary to start this test. They are specified in the docker compose file specified in the variable - cls.DOCKER_COMPOSE_FILE. + cls.SCENARIO. """ # We have to perform docker-compose build + docker-compose up, # instead of just doing the latter because of a bug which will give a # 500 internal error for the Docker bug. When this is fixed, we should # remove this first extra step. - subprocess.call(["docker-compose", "build"], cwd=cls.DOCKER_COMPOSE_FILE) - subprocess.call(["docker-compose", "up", "-d"], cwd=cls.DOCKER_COMPOSE_FILE) + subprocess.call(["docker-compose", "build"], cwd=cls.SCENARIO) + subprocess.call(["docker-compose", "up", "-d"], cwd=cls.SCENARIO) @classmethod def _shutdown_docker_services(cls): """Shut down all the docker services necessary to start this test. They are specified in the docker compose file specified in the variable - cls.DOCKER_COMPOSE_FILE. + cls.SCENARIO. """ - subprocess.call(["docker-compose", "stop"], cwd=cls.DOCKER_COMPOSE_FILE) - subprocess.call(["docker-compose", "rm", "--force"], cwd=cls.DOCKER_COMPOSE_FILE) + subprocess.call(["docker-compose", "stop"], cwd=cls.SCENARIO) + subprocess.call(["docker-compose", "rm", "--force"], cwd=cls.SCENARIO) @classmethod def _get_proxysql_container(cls): diff --git a/test/sysbench_test.py b/test/sysbench_test.py index e1ca2155d..e4d28141d 100644 --- a/test/sysbench_test.py +++ b/test/sysbench_test.py @@ -2,7 +2,7 @@ from proxysql_base_test import ProxySQLBaseTest class SysBenchTest(ProxySQLBaseTest): - DOCKER_COMPOSE_FILE = "./scenarios/1backend" + SCENARIO = "./scenarios/1backend" def test_proxy_doesnt_crash_under_mild_sysbench_load(self): ProxySQLBaseTest.run_sysbench_proxysql() \ No newline at end of file