예제 #1
0
def docker_client():
    try:
        client = docker.from_env()
    except DockerException:
        pytest.skip(
            "Failed to get a connection to docker running on the system")
    connectable = ContainerFactory.client_connectable(client)
    if connectable is not True:  # pragma: nocover
        pytest.skip(connectable)
    return client
예제 #2
0
def docker_client():
    if salt.utils.path.which("docker") is None:
        pytest.skip("The docker binary is not available")
    try:
        client = docker.from_env()
        connectable = ContainerFactory.client_connectable(client)
        if connectable is not True:  # pragma: no cover
            pytest.skip(connectable)
        return client
    except DockerException:
        pytest.skip(
            "Failed to get a connection to docker running on the system")
예제 #3
0
def docker_client():
    client = docker.from_env()
    connectable = ContainerFactory.client_connectable(client)
    if connectable is not True:  # pragma: no cover
        pytest.skip(connectable)
    return client