MCPcopy Index your code
hub / github.com/apache/caldera / test_remove

Method test_remove

tests/services/test_data_svc.py:149–155  ·  view source on GitHub ↗
(self, event_loop, data_svc)

Source from the content-addressed store, hash-verified

147 json.dumps(x.display)
148
149 def test_remove(self, event_loop, data_svc):
150 a1 = event_loop.run_until_complete(data_svc.store(Agent(sleep_min=2, sleep_max=8, watchdog=0)))
151 agents = event_loop.run_until_complete(data_svc.locate('agents', match=dict(paw=a1.paw)))
152 assert len(agents) == 1
153 event_loop.run_until_complete(data_svc.remove('agents', match=dict(paw=a1.paw)))
154 agents = event_loop.run_until_complete(data_svc.locate('agents', match=dict(paw=a1.paw)))
155 assert len(agents) == 0
156
157 def test_no_autogen_cleanup_cmds(self, event_loop, data_svc):
158 cleanup_executor = Executor(name='sh', platform='linux', cleanup='rm #{payload}')

Callers

nothing calls this directly

Calls 4

AgentClass · 0.90
storeMethod · 0.45
locateMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected