Skip to content

Commit

Permalink
Remove build fixture from tests to see if image is built in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-p-marques committed Dec 4, 2020
1 parent 47f8f46 commit dc0b60e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,14 @@
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

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.
Expand Down

0 comments on commit dc0b60e

Please sign in to comment.