Add commands unit test_get_monkey_cmd_lines_linux

This commit is contained in:
Ilija Lazoroski 2021-06-17 21:17:14 +02:00 committed by Ilija Lazoroski
parent 9a3d015503
commit d76e69fffe
1 changed files with 23 additions and 0 deletions

View File

@ -1,5 +1,6 @@
from infection_monkey.utils.commands import (
build_monkey_commandline_explicitly,
get_monkey_cmd_lines_linux,
get_monkey_cmd_lines_windows,
)
@ -86,3 +87,25 @@ def test_get_monkey_cmd_lines_windows():
)
assert test1 == result1
def test_get_monkey_cmd_lines_linux():
test1 = [
"monkey-linux-64",
"m0nk3y",
"-p",
"101010",
"-t",
"10.10.101.10",
]
result1 = get_monkey_cmd_lines_linux(
"/home/user/monkey-linux-64",
[
"-p",
"101010",
"-t",
"10.10.101.10",
],
)
assert test1 == result1