Skip to content

Commit

Permalink
docker version upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsanfal committed Jul 5, 2024
1 parent e8dd52c commit a4e1c1a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion conans/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ WebTest>=2.0.18, <2.1.0
bottle
PyJWT
pluginbase
docker>=5.0.0, <6.0.0
docker
setuptools
2 changes: 1 addition & 1 deletion conans/requirements_runner.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
paramiko
docker>=5.0.0, <6.0.0
docker>=7.1.0
42 changes: 21 additions & 21 deletions test/integration/command/runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def dockerfile_path(name=None):
return path


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_cache_shared():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -73,13 +73,13 @@ def test_create_docker_runner_cache_shared():

client.save({"host": profile_host, "build": profile_build})
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h host -pr:b build")
client.run("create . -pr:h host -pr:b build -vvv")

assert "[100%] Built target example" in client.out
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_cache_shared_profile_from_cache():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -116,13 +116,13 @@ def test_create_docker_runner_cache_shared_profile_from_cache():

client.save({"default_host": profile_host, "default_build": profile_build}, path=client.cache.profiles_path)
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h default_host -pr:b default_build")
client.run("create . -pr:h default_host -pr:b default_build -vvv")

assert "[100%] Built target example" in client.out
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_cache_shared_profile_folder():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -160,12 +160,12 @@ def test_create_docker_runner_cache_shared_profile_folder():
client.save({"build": profile_build})
client.save({"docker_default": profile_host}, path = os.path.join(client.cache_folder, "profiles"))
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h docker_default -pr:b build")
client.run("create . -pr:h docker_default -pr:b build -vvv")

assert "[100%] Built target example" in client.out
assert "Removing container" in client.out

@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_dockerfile_folder_path():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -220,22 +220,22 @@ def test_create_docker_runner_dockerfile_folder_path():

client.save({"host_copy": profile_host_copy, "host_clean": profile_host_clean, "build": profile_build})
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h host_copy -pr:b build")
client.run("create . -pr:h host_copy -pr:b build -vvv")

assert "Restore: pkg/0.2" in client.out
assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out
assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe metadata" in client.out
assert "Removing container" in client.out

client.run("create . -pr:h host_clean -pr:b build")
client.run("create . -pr:h host_clean -pr:b build -vvv")

assert "Restore: pkg/0.2" in client.out
assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out
assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe metadata" in client.out
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_profile_default_folder():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -271,7 +271,7 @@ def test_create_docker_runner_profile_default_folder():
client.save({"host_from_profile": profile_host}, path = os.path.join(client.cache_folder, "profiles"))
client.save({"build_from_profile": profile_build}, path = os.path.join(client.cache_folder, "profiles"))
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h host_from_profile -pr:b build_from_profile")
client.run("create . -pr:h host_from_profile -pr:b build_from_profile -vvv")

assert "Container conan-runner-docker running" in client.out
assert "Restore: pkg/0.2" in client.out
Expand All @@ -280,7 +280,7 @@ def test_create_docker_runner_profile_default_folder():
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_dockerfile_file_path():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -315,7 +315,7 @@ def test_create_docker_runner_dockerfile_file_path():
""")
client.save({"host": profile_host, "build": profile_build})
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h host -pr:b build")
client.run("create . -pr:h host -pr:b build -vvv")

assert "Container conan-runner-docker running" in client.out
assert "Restore: pkg/0.2" in client.out
Expand All @@ -324,7 +324,7 @@ def test_create_docker_runner_dockerfile_file_path():
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
@pytest.mark.parametrize("build_type,shared", [("Release", False), ("Debug", True)])
@pytest.mark.tool("ninja")
def test_create_docker_runner_with_ninja(build_type, shared):
Expand Down Expand Up @@ -385,11 +385,11 @@ def package(self):
client.save({"profile": profile})
settings = "-s os=Linux -s arch=x86_64 -s build_type={} -o hello/*:shared={}".format(build_type, shared)
# create should also work
client.run("create . --name=hello --version=1.0 {} -pr:h=profile -pr:b=profile".format(settings))
client.run("create . --name=hello --version=1.0 {} -pr:h=profile -pr:b=profile".format(settings -vvv))
assert 'cmake -G "Ninja"' in client.out
assert "main: {}!".format(build_type) in client.out

@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_from_configfile():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -434,7 +434,7 @@ def test_create_docker_runner_from_configfile():

client.save({"host": profile_host, "build": profile_build})
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h 'host' -pr:b 'build'")
client.run("create . -pr:h 'host' -pr:b 'build' -vvv")

assert "Container my-custom-conan-runner-container running" in client.out
assert "Restore: pkg/0.2" in client.out
Expand All @@ -443,7 +443,7 @@ def test_create_docker_runner_from_configfile():
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_from_configfile_with_args():
"""
Tests the ``conan create . ``
Expand Down Expand Up @@ -490,7 +490,7 @@ def test_create_docker_runner_from_configfile_with_args():

client.save({"host": profile_host, "build": profile_build})
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h 'host' -pr:b 'build'")
client.run("create . -pr:h 'host' -pr:b 'build' -vvv")

assert "test/integration/command/dockerfiles/Dockerfile_args" in client.out
assert "Restore: pkg/0.2" in client.out
Expand All @@ -499,7 +499,7 @@ def test_create_docker_runner_from_configfile_with_args():
assert "Removing container" in client.out


@pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
# @pytest.mark.skipif(docker_skip('ubuntu:22.04'), reason="Only docker running")
def test_create_docker_runner_default_build_profile():
"""
Tests the ``conan create . ``
Expand All @@ -526,7 +526,7 @@ def test_create_docker_runner_default_build_profile():

client.save({"host_clean": profile_host})
client.run("new cmake_lib -d name=pkg -d version=0.2")
client.run("create . -pr:h host_clean")
client.run("create . -pr:h host_clean -vvv")

assert "Restore: pkg/0.2" in client.out
assert "Restore: pkg/0.2:8631cf963dbbb4d7a378a64a6fd1dc57558bc2fe" in client.out
Expand Down

0 comments on commit a4e1c1a

Please sign in to comment.