Files
awoooi/apps/api/tests/test_ssh_provider_tools.py
Your Name 433f7b068e
All checks were successful
CD Pipeline / tests (push) Successful in 2m7s
Code Review / ai-code-review (push) Successful in 42s
CD Pipeline / build-and-deploy (push) Successful in 13m14s
CD Pipeline / post-deploy-checks (push) Successful in 4m29s
fix(aiops): close ssh and telegram remediation gaps
2026-05-01 16:53:02 +08:00

22 lines
636 B
Python

import pytest
from src.plugins.mcp.providers.ssh_provider import SSHProvider
@pytest.mark.asyncio
async def test_ssh_diagnose_is_registered_read_only_tool():
provider = SSHProvider()
tool_names = {tool.name for tool in await provider.list_tools()}
command = provider._build_command("ssh_diagnose", {})
assert "ssh_diagnose" in tool_names
assert "CPU TOP" in command
assert "df -h" in command
def test_ssh_provider_uses_ollama_user_for_188():
provider = SSHProvider()
assert provider._ssh_user_for_host("192.168.0.188") == "ollama"
assert provider._ssh_user_for_host("192.168.0.110") == "wooo"