Fix compose v1 naming scheme

This commit is contained in:
Mikhail f. Shiryaev 2024-10-01 11:47:17 +02:00
parent 1fcbdb8b62
commit 93519c5a29
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4
2 changed files with 15 additions and 33 deletions

View File

@ -38,20 +38,16 @@ def dotnet_container():
DOCKER_COMPOSE_PATH, "docker_compose_dotnet_client.yml"
)
run_and_check(
[
"docker",
"compose",
"-p",
cluster.project_name,
cluster.compose_cmd(
"-f",
docker_compose,
"up",
"--force-recreate",
"-d",
"--no-build",
]
)
)
yield docker.from_env().containers.get(cluster.project_name + "_dotnet1_1")
yield docker.from_env().containers.get(cluster.get_instance_docker_id("dotnet1"))
def test_dotnet_client(started_cluster, dotnet_container):

View File

@ -51,9 +51,7 @@ def golang_container():
DOCKER_COMPOSE_PATH, "docker_compose_mysql_golang_client.yml"
)
run_and_check(
[
"docker",
"compose",
cluster.compose_cmd(
"-p",
cluster.project_name,
"-f",
@ -62,13 +60,13 @@ def golang_container():
"--force-recreate",
"-d",
"--no-build",
]
)
)
yield docker.DockerClient(
base_url="unix:///var/run/docker.sock",
version=cluster.docker_api_version,
timeout=600,
).containers.get(cluster.project_name + "_golang1_1")
).containers.get(cluster.get_instance_docker_id("golang1"))
@pytest.fixture(scope="module")
@ -77,26 +75,22 @@ def php_container():
DOCKER_COMPOSE_PATH, "docker_compose_mysql_php_client.yml"
)
run_and_check(
[
"docker",
"compose",
cluster.compose_cmd(
"--env-file",
cluster.instances["node"].env_file,
"-p",
cluster.project_name,
"-f",
docker_compose,
"up",
"--force-recreate",
"-d",
"--no-build",
]
)
)
yield docker.DockerClient(
base_url="unix:///var/run/docker.sock",
version=cluster.docker_api_version,
timeout=600,
).containers.get(cluster.project_name + "_php1_1")
).containers.get(cluster.get_instance_docker_id("php1"))
@pytest.fixture(scope="module")
@ -105,26 +99,22 @@ def nodejs_container():
DOCKER_COMPOSE_PATH, "docker_compose_mysql_js_client.yml"
)
run_and_check(
[
"docker",
"compose",
cluster.compose_cmd(
"--env-file",
cluster.instances["node"].env_file,
"-p",
cluster.project_name,
"-f",
docker_compose,
"up",
"--force-recreate",
"-d",
"--no-build",
]
)
)
yield docker.DockerClient(
base_url="unix:///var/run/docker.sock",
version=cluster.docker_api_version,
timeout=600,
).containers.get(cluster.project_name + "_mysqljs1_1")
).containers.get(cluster.get_instance_docker_id("mysqljs1"))
@pytest.fixture(scope="module")
@ -133,26 +123,22 @@ def java_container():
DOCKER_COMPOSE_PATH, "docker_compose_mysql_java_client.yml"
)
run_and_check(
[
"docker",
"compose",
cluster.compose_cmd(
"--env-file",
cluster.instances["node"].env_file,
"-p",
cluster.project_name,
"-f",
docker_compose,
"up",
"--force-recreate",
"-d",
"--no-build",
]
)
)
yield docker.DockerClient(
base_url="unix:///var/run/docker.sock",
version=cluster.docker_api_version,
timeout=600,
).containers.get(cluster.project_name + "_java1_1")
).containers.get(cluster.get_instance_docker_id("java1"))
def test_mysql_client(started_cluster):