1
0
mirror of https://github.com/Tecnativa/docker-socket-proxy synced 2024-12-21 14:18:07 +00:00

Remove build fixture from tests to see if image is built in CI

This commit is contained in:
João Marques 2020-12-04 09:07:31 +00:00
parent 47f8f46418
commit dc0b60e63f

View File

@ -2,9 +2,7 @@ import json
import os
from contextlib import contextmanager
from logging import info
from pathlib import Path
import pytest
from plumbum import local
from plumbum.cmd import docker
@ -12,14 +10,6 @@ DOCKER_REPO = os.environ.get("DOCKER_REPO", "docker-socket-proxy")
IMAGE_NAME = f"{DOCKER_REPO}:local"
@pytest.fixture(autouse=True, scope="session")
def docker_image():
"""Build local docker image once before starting test suite."""
info(f"Building {IMAGE_NAME}...")
docker("build", "-t", IMAGE_NAME, Path(__file__).parent.parent)
return IMAGE_NAME
@contextmanager
def proxy(**env_vars):
"""A context manager that starts the proxy with the specified env.