MCPcopy Create free account
hub / github.com/StackStorm/st2 / test_action

Method test_action

st2client/tests/unit/test_shell.py:235–254  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

233 self.assertEqual(ns.func, func)
234
235 def test_action(self):
236 args_list = [
237 ["action", "list"],
238 ["action", "get", "abc"],
239 ["action", "create", "/tmp/action.json"],
240 ["action", "update", "123", "/tmp/action.json"],
241 ["action", "delete", "abc"],
242 ["action", "execute", "-h"],
243 ["action", "execute", "remote", "-h"],
244 [
245 "action",
246 "execute",
247 "remote",
248 "hosts=192.168.1.1",
249 "user=st2",
250 'cmd="ls -l"',
251 ],
252 ["action", "execute", "remote-fib", "hosts=192.168.1.1", "3", "8"],
253 ]
254 self._validate_parser(args_list)
255
256 def test_action_execution(self):
257 args_list = [

Callers

nothing calls this directly

Calls 1

_validate_parserMethod · 0.95

Tested by

no test coverage detected