Set base_image in a few more places

pull/909/head
YuviPanda 2022-07-25 11:39:43 -07:00
rodzic b58fd1508d
commit 7eb143eab0
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -12,7 +12,7 @@ from repo2docker.buildpacks import (
)
def test_cache_from_base(tmpdir):
def test_cache_from_base(tmpdir, base_image):
cache_from = ["image-1:latest"]
fake_log_value = {"stream": "fake"}
fake_client = MagicMock(spec=docker.APIClient)
@ -21,7 +21,7 @@ def test_cache_from_base(tmpdir):
# Test base image build pack
tmpdir.chdir()
for line in BaseImage().build(
for line in BaseImage(base_image).build(
fake_client, "image-2", 100, {}, cache_from, extra_build_kwargs
):
assert line == fake_log_value

Wyświetl plik

@ -13,7 +13,7 @@ from repo2docker.buildpacks import BaseImage, DockerBuildPack
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def test_memory_limit_enforced(tmpdir):
def test_memory_limit_enforced(tmpdir, base_image):
fake_cache_from = ["image-1:latest"]
fake_log_value = {"stream": "fake"}
fake_client = MagicMock(spec=docker.APIClient)
@ -27,7 +27,7 @@ def test_memory_limit_enforced(tmpdir):
# Test that the buildpack passes the right arguments to the docker
# client in order to enforce the memory limit
tmpdir.chdir()
for line in BaseImage().build(
for line in BaseImage(base_image).build(
fake_client,
"image-2",
memory_limit,