forked from p15670423/monkey
Agent: Remove TunnelTelem
This commit is contained in:
parent
7530a89152
commit
cb45cd8873
|
@ -1,18 +0,0 @@
|
||||||
from typing import Mapping
|
|
||||||
|
|
||||||
from common.common_consts.telem_categories import TelemCategoryEnum
|
|
||||||
from infection_monkey.telemetry.base_telem import BaseTelem
|
|
||||||
|
|
||||||
|
|
||||||
class TunnelTelem(BaseTelem):
|
|
||||||
def __init__(self, proxy: Mapping[str, str]):
|
|
||||||
"""
|
|
||||||
Default tunnel telemetry constructor
|
|
||||||
"""
|
|
||||||
super(TunnelTelem, self).__init__()
|
|
||||||
self.proxy = proxy.get("https")
|
|
||||||
|
|
||||||
telem_category = TelemCategoryEnum.TUNNEL
|
|
||||||
|
|
||||||
def get_data(self):
|
|
||||||
return {"proxy": self.proxy}
|
|
|
@ -1,19 +0,0 @@
|
||||||
import json
|
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
from infection_monkey.telemetry.tunnel_telem import TunnelTelem
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
|
||||||
def tunnel_telem_test_instance():
|
|
||||||
return TunnelTelem({})
|
|
||||||
|
|
||||||
|
|
||||||
def test_tunnel_telem_send(tunnel_telem_test_instance, spy_send_telemetry):
|
|
||||||
tunnel_telem_test_instance.send()
|
|
||||||
expected_data = {"proxy": None}
|
|
||||||
expected_data = json.dumps(expected_data, cls=tunnel_telem_test_instance.json_encoder)
|
|
||||||
|
|
||||||
assert spy_send_telemetry.data == expected_data
|
|
||||||
assert spy_send_telemetry.telem_category == "tunnel"
|
|
Loading…
Reference in New Issue