diff --git a/tests/test_pipelock_image.py b/tests/test_pipelock_image.py index 68f32a9..c8c1213 100644 --- a/tests/test_pipelock_image.py +++ b/tests/test_pipelock_image.py @@ -1,11 +1,7 @@ -"""Integration: verify the pinned pipelock image. Requires docker. - - Pinned digest is reachable on the registry. - - Image's ENTRYPOINT/CMD match what claude_bottle.pipelock assumes - (`/pipelock` and `run --listen 0.0.0.0:8888`). - - The /pipelock binary actually runs (--version succeeds).""" +"""Integration: the pinned pipelock image's binary actually runs. +Catches a broken upstream packaging at the pinned digest. Requires +docker.""" -import json -import re import subprocess import unittest @@ -17,7 +13,6 @@ from tests._docker import skip_unless_docker class TestPipelockImage(unittest.TestCase): @classmethod def setUpClass(cls): - # Pull the pinned image (cheap if cached). result = subprocess.run( ["docker", "pull", PIPELOCK_IMAGE], stdout=subprocess.DEVNULL, @@ -26,22 +21,6 @@ class TestPipelockImage(unittest.TestCase): if result.returncode != 0: raise unittest.SkipTest(f"could not pull {PIPELOCK_IMAGE}") - def test_entrypoint_contains_pipelock(self): - result = subprocess.run( - ["docker", "image", "inspect", PIPELOCK_IMAGE, - "--format", "{{json .Config.Entrypoint}}"], - capture_output=True, text=True, - ) - self.assertIn("/pipelock", result.stdout) - - def test_cmd_contains_run(self): - result = subprocess.run( - ["docker", "image", "inspect", PIPELOCK_IMAGE, - "--format", "{{json .Config.Cmd}}"], - capture_output=True, text=True, - ) - self.assertIn("run", result.stdout) - def test_binary_runs(self): result = subprocess.run( ["docker", "run", "--rm", PIPELOCK_IMAGE, "--version"], diff --git a/tests/test_pipelock_naming.py b/tests/test_pipelock_naming.py deleted file mode 100644 index a547a32..0000000 --- a/tests/test_pipelock_naming.py +++ /dev/null @@ -1,33 +0,0 @@ -"""Unit: pipelock naming helpers (container_name, proxy_url, proxy_host_port).""" - -import unittest - -from claude_bottle.pipelock import ( - pipelock_container_name, - pipelock_proxy_host_port, - pipelock_proxy_url, -) - - -class TestPipelockNaming(unittest.TestCase): - def test_container_name_simple(self): - self.assertEqual("claude-bottle-pipelock-foo", pipelock_container_name("foo")) - - def test_container_name_with_hyphens(self): - self.assertEqual( - "claude-bottle-pipelock-some-slug", pipelock_container_name("some-slug") - ) - - def test_proxy_url_default_port(self): - self.assertEqual( - "http://claude-bottle-pipelock-foo:8888", pipelock_proxy_url("foo") - ) - - def test_proxy_host_port_default_port(self): - self.assertEqual( - "claude-bottle-pipelock-foo:8888", pipelock_proxy_host_port("foo") - ) - - -if __name__ == "__main__": - unittest.main()