Skip to content

Commit 4e61f84

Browse files
committed
fix: fix test for --no-cache
1 parent 0ea0348 commit 4e61f84

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/python/pants/backend/docker/goals/package_image_test.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3107,13 +3107,18 @@ def check_build_process(result: DockerImageBuildProcess):
31073107
def test_global_build_no_cache_options_exits(
31083108
rule_runner: RuleRunner,
31093109
) -> None:
3110+
rule_runner.set_options(
3111+
[],
3112+
env={
3113+
"PANTS_DOCKER_BUILD_EXTRA_OPTIONS": '["--no-cache"]',
3114+
},
3115+
)
31103116
rule_runner.write_files(
31113117
{
31123118
"docker/test/BUILD": dedent(
31133119
"""\
31143120
docker_image(
31153121
name="img1",
3116-
no_cache=True,
31173122
)
31183123
"""
31193124
),
@@ -3139,8 +3144,7 @@ def test_global_build_no_cache_options_overridden_by_target_extra_options(
31393144
"""\
31403145
docker_image(
31413146
name="img1",
3142-
no_cache=False,
3143-
extra_build_options=["--no_cache"],
3147+
extra_build_options=["--no-cache"],
31443148
)
31453149
"""
31463150
),

0 commit comments

Comments
 (0)