Summary
All current tests are unit tests with respx mocks. No integration test exercises a real IICP node. This issue tracks the work to add one once a node with a publicly-routable endpoint is registered.
Current blocker
GET /api/v1/discover returns endpoint: "http://localhost:8080/..." for all registered nodes (W-011 — adapter registered with non-internet-routable public_endpoint). submit() and chat() will fail with a connection error until at least one node registers with a real public endpoint.
What to add (once blocker is cleared)
# tests/test_integration.py (skip if IICP_INTEGRATION_TEST not set)
@pytest.mark.skipif(not os.getenv("IICP_INTEGRATION_TEST"), reason="requires live node")
@pytest.mark.asyncio
async def test_live_discover():
client = IicpClient(ClientConfig(directory_url="https://iicp.network/api"))
nodes = await client.discover_async("urn:iicp:intent:llm:chat:v1")
assert len(nodes.nodes) > 0
assert nodes.nodes[0].endpoint.startswith("http")
@pytest.mark.skipif(not os.getenv("IICP_INTEGRATION_TEST"), reason="requires live node")
@pytest.mark.asyncio
async def test_live_chat():
client = IicpClient()
response = await client.chat_async(
messages=[{"role": "user", "content": "Reply with exactly: IICP OK"}]
)
assert response.choices[0].message.content
Acceptance criteria
Summary
All current tests are unit tests with
respxmocks. No integration test exercises a real IICP node. This issue tracks the work to add one once a node with a publicly-routable endpoint is registered.Current blocker
GET /api/v1/discoverreturnsendpoint: "http://localhost:8080/..."for all registered nodes (W-011 — adapter registered with non-internet-routable public_endpoint).submit()andchat()will fail with a connection error until at least one node registers with a real public endpoint.What to add (once blocker is cleared)
Acceptance criteria
tests/test_integration.pyadded with live discover + chat testsIICP_INTEGRATION_TEST=1secret is set