MCPcopy
hub / github.com/apache/caldera / sample_agent

Function sample_agent

tests/web_server/test_core_endpoints.py:53–62  ·  view source on GitHub ↗
(aiohttp_client)

Source from the content-addressed store, hash-verified

51
52@pytest.fixture
53async def sample_agent(aiohttp_client):
54 kwargs = dict(architecture='amd64', exe_name='sandcat.go', executors=['shellcode_amd64', 'sh'],
55 group='red', host='testsystem.localdomain', location='./sandcat.go', pid=125266,
56 platform='linux', ppid=124042, privilege='User', server='http://127.0.0.1:8888',
57 username='testuser', paw=None, contact='http')
58
59 agent = await BaseService.get_service('data_svc').store(Agent(sleep_min=0, sleep_max=60, watchdog=0, **kwargs))
60 yield agent
61
62 await BaseService.get_service('data_svc').remove('agent', dict(paw=agent.paw))
63
64
65async def test_home(aiohttp_client):

Callers

nothing calls this directly

Calls 4

AgentClass · 0.90
get_serviceMethod · 0.80
storeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected