Skip to content

Commit

Permalink
docker runner test skip fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsanfal committed Apr 23, 2024
1 parent 8fecd97 commit 07232cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions conans/requirements_dev.txt
Expand Up @@ -7,3 +7,4 @@ bottle
PyJWT
pluginbase
docker>=5.0.0, <6.0.0
setuptools
12 changes: 6 additions & 6 deletions conans/test/integration/command/runner_test.py
Expand Up @@ -12,7 +12,7 @@ def docker_skip(test_image=None):
try:
docker_client = docker.from_env()
if test_image:
docker_client.images.get(test_image)
docker_client.images.pull(test_image)
except docker.errors.DockerException:
return True
except docker.errors.ImageNotFound:
Expand All @@ -34,7 +34,7 @@ def dockerfile_path(name=None):
return path


@pytest.mark.skipif(docker_skip(), reason="Only docker running")
@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.xfail(reason="conan inside docker optional test")
def test_create_docker_runner_dockerfile_folder_path():
"""
Expand Down Expand Up @@ -120,7 +120,7 @@ class MyTest(ConanFile):
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip(), reason="Only docker running")
@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.xfail(reason="conan inside docker optional test")
def test_create_docker_runner_dockerfile_file_path():
"""
Expand Down Expand Up @@ -180,7 +180,7 @@ class MyTest(ConanFile):
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip(), reason="Only docker running")
@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.xfail(reason="conan inside docker optional test")
@pytest.mark.parametrize("build_type,shared", [("Release", False), ("Debug", True)])
@pytest.mark.tool("ninja")
Expand Down Expand Up @@ -246,7 +246,7 @@ def package(self):
assert 'cmake -G "Ninja"' in client.out
assert "main: {}!".format(build_type) in client.out

@pytest.mark.skipif(docker_skip(), reason="Only docker running")
@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.xfail(reason="conan inside docker optional test")
def test_create_docker_runner_profile_abs_path():
"""
Expand Down Expand Up @@ -306,7 +306,7 @@ class MyTest(ConanFile):
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip(), reason="Only docker running")
@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.xfail(reason="conan inside docker optional test")
def test_create_docker_runner_profile_abs_path_from_configfile():
"""
Expand Down

0 comments on commit 07232cd

Please sign in to comment.