#295 Renaming DOCKER_COMPOSE_FILE to SCENARIO

pull/313/head
Andrei Ismail 11 years ago
parent 6dbe98939f
commit dc63aecfa9

@ -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

@ -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(

@ -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):

@ -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):

@ -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()
Loading…
Cancel
Save