forked from p15670423/monkey
Agent: Add control client proxies to tunnel telem initialization
This commit is contained in:
parent
799ff3d6fd
commit
fb1a577823
|
@ -167,7 +167,7 @@ class InfectionMonkey:
|
|||
self._monkey_inbound_tunnel.start()
|
||||
|
||||
StateTelem(is_done=False, version=get_version()).send()
|
||||
TunnelTelem().send()
|
||||
TunnelTelem(self.cc_client.proxies).send()
|
||||
|
||||
self._build_master()
|
||||
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
from typing import Mapping
|
||||
|
||||
from common.common_consts.telem_categories import TelemCategoryEnum
|
||||
from infection_monkey.control import ControlClient
|
||||
from infection_monkey.telemetry.base_telem import BaseTelem
|
||||
|
||||
|
||||
class TunnelTelem(BaseTelem):
|
||||
def __init__(self):
|
||||
def __init__(self, proxy: Mapping[str, str]):
|
||||
"""
|
||||
Default tunnel telemetry constructor
|
||||
"""
|
||||
super(TunnelTelem, self).__init__()
|
||||
self.proxy = ControlClient.proxies.get("https")
|
||||
self.proxy = proxy.get("https")
|
||||
|
||||
telem_category = TelemCategoryEnum.TUNNEL
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ from infection_monkey.telemetry.tunnel_telem import TunnelTelem
|
|||
|
||||
@pytest.fixture
|
||||
def tunnel_telem_test_instance():
|
||||
return TunnelTelem()
|
||||
return TunnelTelem({})
|
||||
|
||||
|
||||
def test_tunnel_telem_send(tunnel_telem_test_instance, spy_send_telemetry):
|
||||
|
|
Loading…
Reference in New Issue