FAIL
....F. [100%]
=================================== FAILURES ===================================
___________________ test_can_list_pods_in_allowed_namespace ____________________
def test_can_list_pods_in_allowed_namespace() -> None:
result = call_tool("k8s_list", {"resource": "pods", "namespace": NAMESPACE})
> body = tool_text(result)
^^^^^^^^^^^^^^^^^
tests/test_mcp_server.py:76:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
result = {'error': {'code': -32000, 'message': 'Kubernetes API error 403: Forbidden'}, 'id': 10, 'jsonrpc': '2.0'}
def tool_text(result: dict) -> dict:
> content = result["result"]["content"][0]
^^^^^^^^^^^^^^^^
E KeyError: 'result'
tests/test_mcp_server.py:38: KeyError
=============================== warnings summary ===============================
usr/local/lib/python3.11/site-packages/_pytest/cacheprovider.py:475
/usr/local/lib/python3.11/site-packages/_pytest/cacheprovider.py:475: PytestCacheWarning: could not create cache path /tests/.pytest_cache/v/cache/nodeids: [Errno 30] Read-only file system: '/tests/pytest-cache-files-uok4hpoi'
config.cache.set("cache/nodeids", sorted(self.cached_nodeids))
usr/local/lib/python3.11/site-packages/_pytest/cacheprovider.py:429
/usr/local/lib/python3.11/site-packages/_pytest/cacheprovider.py:429: PytestCacheWarning: could not create cache path /tests/.pytest_cache/v/cache/lastfailed: [Errno 30] Read-only file system: '/tests/pytest-cache-files-s8y8o212'
config.cache.set("cache/lastfailed", self.lastfailed)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_mcp_server.py::test_can_list_pods_in_allowed_namespace - Ke...
1 failed, 5 passed, 2 warnings in 0.55s