forked from p15670423/monkey
UT: Modify ExploitTelem calls in UTs
This commit is contained in:
parent
afb7210179
commit
dff5bde894
|
@ -5,6 +5,7 @@ import pytest
|
||||||
from infection_monkey.exploit.sshexec import SSHExploiter
|
from infection_monkey.exploit.sshexec import SSHExploiter
|
||||||
from infection_monkey.model.host import VictimHost
|
from infection_monkey.model.host import VictimHost
|
||||||
from infection_monkey.telemetry.exploit_telem import ExploitTelem
|
from infection_monkey.telemetry.exploit_telem import ExploitTelem
|
||||||
|
from monkey.infection_monkey.i_puppet.i_puppet import ExploiterResultData
|
||||||
|
|
||||||
DOMAIN_NAME = "domain-name"
|
DOMAIN_NAME = "domain-name"
|
||||||
IP = "0.0.0.0"
|
IP = "0.0.0.0"
|
||||||
|
@ -30,11 +31,13 @@ EXPLOITER_INFO = {
|
||||||
}
|
}
|
||||||
EXPLOITER_ATTEMPTS = []
|
EXPLOITER_ATTEMPTS = []
|
||||||
RESULT = False
|
RESULT = False
|
||||||
|
OS_LINUX = "linux"
|
||||||
|
ERROR_MSG = "failed because yolo"
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def exploit_telem_test_instance():
|
def exploit_telem_test_instance():
|
||||||
return ExploitTelem(EXPLOITER_NAME, HOST, RESULT, RESULT, EXPLOITER_INFO, EXPLOITER_ATTEMPTS)
|
return ExploitTelem(EXPLOITER_NAME, HOST, ExploiterResultData(RESULT, RESULT, OS_LINUX, EXPLOITER_INFO, EXPLOITER_ATTEMPTS, ERROR_MSG))
|
||||||
|
|
||||||
|
|
||||||
def test_exploit_telem_send(exploit_telem_test_instance, spy_send_telemetry):
|
def test_exploit_telem_send(exploit_telem_test_instance, spy_send_telemetry):
|
||||||
|
|
Loading…
Reference in New Issue