mirror of
https://github.com/Tecnativa/docker-socket-proxy
synced 2024-12-22 06:38:07 +00:00
Build docker image before testing
This commit is contained in:
parent
0b7c5d9dcb
commit
8d09134a66
@ -1,5 +1,6 @@
|
||||
import logging
|
||||
|
||||
import pytest
|
||||
from plumbum import ProcessExecutionError
|
||||
from plumbum.cmd import docker
|
||||
|
||||
@ -9,6 +10,12 @@ CONTAINER_NAME = "docksockprox_test"
|
||||
SOCKET_PROXY = "127.0.0.1:2375"
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def build_docker_image():
|
||||
logger.info("Building docker image...")
|
||||
docker("build", "-t", "docker-socket-proxy:local", ".")
|
||||
|
||||
|
||||
def _start_proxy(
|
||||
container_name=CONTAINER_NAME, socket_proxy=SOCKET_PROXY, extra_args=None
|
||||
):
|
||||
@ -24,7 +31,7 @@ def _start_proxy(
|
||||
"-p",
|
||||
f"{socket_proxy}:2375",
|
||||
extra_args,
|
||||
"tecnativa/docker-socket-proxy",
|
||||
"docker-socket-proxy:local",
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user