From d589c08d9dbd6628bd739ec7d47a0e2634af856b Mon Sep 17 00:00:00 2001 From: didericis Date: Sun, 19 Jul 2026 18:03:11 -0400 Subject: [PATCH] test(firecracker): pin INFRA_BUILD off in the default-pull test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The coverage CI job exports BOT_BOTTLE_INFRA_BUILD=local so the integration suite builds infra/agent images from source. But that job also runs the unit suite, and the ambient =local leaked into test_default_pulls_artifact_without_ docker — it drove ensure_built() down the local Docker-build branch, so the "build_image not called / artifact pulled" assertion failed (build_image called 3 times). Pin the var off in that test so it exercises the default pull path regardless of the runner's ambient env (mirrors test_local_mode_builds_deps_before_infra, which pins it on). Full unit suite verified green under BOT_BOTTLE_INFRA_BUILD =local. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01A9qa3xoavjQScufDfZaXKR --- tests/unit/test_firecracker_infra_vm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_firecracker_infra_vm.py b/tests/unit/test_firecracker_infra_vm.py index 74c3b93..705e8d7 100644 --- a/tests/unit/test_firecracker_infra_vm.py +++ b/tests/unit/test_firecracker_infra_vm.py @@ -100,7 +100,11 @@ class TestRegistryVolume(unittest.TestCase): class TestEnsureBuilt(unittest.TestCase): def test_default_pulls_artifact_without_docker(self): # PRD 0069 Stage 2: the launch host pulls the prebuilt rootfs; no Docker. - with patch.object(infra_vm.docker_mod, "build_image") as build, \ + # Pin BOT_BOTTLE_INFRA_BUILD off: the coverage CI job exports it =local + # for the integration suite, and that ambient value would otherwise send + # this default-path test down the local Docker-build branch. + with patch.dict(os.environ, {"BOT_BOTTLE_INFRA_BUILD": ""}), \ + patch.object(infra_vm.docker_mod, "build_image") as build, \ patch.object(infra_vm.infra_artifact, "ensure_artifact_gz") as pull: infra_vm.ensure_built() build.assert_not_called()