Add IPFS dry-run adapter support

This commit is contained in:
jwinterm
2026-07-05 21:05:46 -04:00
parent a8cb056225
commit 3a51468d29
24 changed files with 169 additions and 33 deletions
+20
View File
@@ -90,6 +90,26 @@ class PrepareOpenTest(unittest.TestCase):
plan.setup_steps,
)
def test_ipfs_desktop_setup_uses_gateway_adapter(self) -> None:
status = TransportStatus(
transport="ipfs",
installed=False,
running=False,
endpoint="http://127.0.0.1:8080",
adoptable=False,
manage_supported=True,
note="IPFS local gateway",
)
with patch("ampbrowser.plan.inspect_transport", return_value=status):
plan = prepare_open("ipfs://bafyexample", consent=True)
self.assertEqual("setup-approved", plan.status)
self.assertEqual(
("install IPFS/Kubo provider", "start managed IPFS gateway", "wait for http://127.0.0.1:8080"),
plan.setup_steps,
)
if __name__ == "__main__":
unittest.main()