diff --git a/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py b/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py index 0b59ff649..8770cb599 100644 --- a/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py +++ b/monkey/tests/unit_tests/infection_monkey/utils/test_commands.py @@ -20,4 +20,42 @@ def test_build_monkey_commandline_explicitly(): 101010, "10.10.101.10", "127.127.127.127:5000", 0, "C:\\windows\\abc", 80 ) + test2 = [ + "-p", + "101010", + "-t", + "10.10.101.10", + "-s", + "200.150.100.50:5000", + "-d", + "0", + "-l", + "C:\\windows\\abc", + "-vp", + "443", + ] + result2 = build_monkey_commandline_explicitly( + 101010, "10.10.101.10", "200.150.100.50:5000", -50, "C:\\windows\\abc", 443 + ) + + test3 = [ + "-p", + "101010", + "-t", + "10.10.101.10", + "-s", + "200.150.100.50:5000", + "-d", + "100", + "-l", + "C:\\windows\\ghi", + "-vp", + "443", + ] + result3 = build_monkey_commandline_explicitly( + 101010, "10.10.101.10", "200.150.100.50:5000", 100, "C:\\windows\\ghi", 443 + ) + assert test1 == result1 + assert test2 == result2 + assert test3 == result3