Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/itential_mcp/tools/gateway_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ async def run_service(
if isinstance(input_params, str):
input_params = jsonutils.loads(input_params)

res = await client.gateway_manager.run_service(name, cluster, input_params)
res = await client.gateway_manager.run_service(
name, cluster, input_params=input_params
)

if "error" in res:
raise ValueError(res["error"]["data"])
Expand Down
10 changes: 5 additions & 5 deletions tests/test_tools_gateway_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ async def test_run_service_success_basic(self):

# Verify client method was called with correct parameters
self.mock_client.gateway_manager.run_service.assert_called_once_with(
"test-service", "test-cluster", {"param1": "value1"}
"test-service", "test-cluster", input_params={"param1": "value1"}
)

# Verify result type and content
Expand Down Expand Up @@ -489,7 +489,7 @@ async def test_run_service_success_no_params(self):

# Verify client method was called with None for input_params
self.mock_client.gateway_manager.run_service.assert_called_once_with(
"no-param-service", "test-cluster", None
"no-param-service", "test-cluster", input_params=None
)

assert isinstance(result, RunServiceResponse)
Expand All @@ -513,7 +513,7 @@ async def test_run_service_with_json_stdout_parsing(self):

# Verify client method was called
self.mock_client.gateway_manager.run_service.assert_called_once_with(
"json-service", "json-cluster", {"format": "json"}
"json-service", "json-cluster", input_params={"format": "json"}
)

# Verify result
Expand Down Expand Up @@ -574,7 +574,7 @@ async def test_run_service_error_response(self):

# Verify client method was still called
self.mock_client.gateway_manager.run_service.assert_called_once_with(
"failing-service", "test-cluster", {"timeout": 30}
"failing-service", "test-cluster", input_params={"timeout": 30}
)

@pytest.mark.asyncio
Expand Down Expand Up @@ -632,7 +632,7 @@ async def test_run_service_with_complex_parameters(self):

# Verify client was called with complex parameters
self.mock_client.gateway_manager.run_service.assert_called_once_with(
"complex-service", "production-cluster", complex_params
"complex-service", "production-cluster", input_params=complex_params
)

assert isinstance(result, RunServiceResponse)
Expand Down