From 649d5ac325fc1aeeddbe066f981c84b7c09b318f Mon Sep 17 00:00:00 2001 From: claude Date: Mon, 20 Jul 2026 13:18:50 +0000 Subject: [PATCH] fix(rebase): correct test_cached_lookup key and drop duplicate test Two issues introduced by the rebase conflict resolution: - test_cached_lookup_requires_ready_marker used _dockerfile_hash as the cache-dir key, but cached_agent_rootfs_dir now uses _rootfs_digest (which also folds in the guest init). Updated the test to match. - test_pyproject_toml_change_bumps_version appeared twice in test_infra_artifact.py (once from main, once from the PR commit that added pyproject.toml support). Removed the duplicate. Co-Authored-By: Claude Sonnet 4.6 --- tests/unit/test_firecracker_image_builder.py | 2 +- tests/unit/test_infra_artifact.py | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/unit/test_firecracker_image_builder.py b/tests/unit/test_firecracker_image_builder.py index 6b88b3b..7cc324d 100644 --- a/tests/unit/test_firecracker_image_builder.py +++ b/tests/unit/test_firecracker_image_builder.py @@ -36,7 +36,7 @@ class TestBuildAgentRootfsDir(unittest.TestCase): self.assertEqual(base, out) def test_cached_lookup_requires_ready_marker(self): - digest = image_builder._dockerfile_hash(self.dockerfile) + digest = image_builder._rootfs_digest(self.dockerfile) base = self.cache / "rootfs" / f"agent-{digest}" base.mkdir(parents=True) with patch.object(image_builder.util, "cache_dir", return_value=self.cache): diff --git a/tests/unit/test_infra_artifact.py b/tests/unit/test_infra_artifact.py index c098b44..4fccf80 100644 --- a/tests/unit/test_infra_artifact.py +++ b/tests/unit/test_infra_artifact.py @@ -134,16 +134,6 @@ class TestVersionInputs(unittest.TestCase): after = ia.infra_artifact_version("init", repo_root=root) self.assertNotEqual(before, after) - def test_pyproject_toml_change_bumps_version(self) -> None: - with tempfile.TemporaryDirectory() as d: - root = Path(d) - self._fake_repo(root) - before = ia.infra_artifact_version("init", repo_root=root) - (root / "pyproject.toml").write_text( - "[project]\nname = 'bot-bottle'\ndependencies = ['httpx']\n") - after = ia.infra_artifact_version("init", repo_root=root) - self.assertNotEqual(before, after) - def test_pyc_and_pycache_ignored(self) -> None: with tempfile.TemporaryDirectory() as d: root = Path(d)