From cb45cd88739602bac1ed6be9addfe4420bb0304c Mon Sep 17 00:00:00 2001 From: Kekoa Kaaikala Date: Thu, 8 Sep 2022 14:30:03 +0000 Subject: [PATCH] Agent: Remove TunnelTelem --- .../telemetry/tunnel_telem.py | 18 ------------------ .../telemetry/test_tunnel_telem.py | 19 ------------------- 2 files changed, 37 deletions(-) delete mode 100644 monkey/infection_monkey/telemetry/tunnel_telem.py delete mode 100644 monkey/tests/unit_tests/infection_monkey/telemetry/test_tunnel_telem.py diff --git a/monkey/infection_monkey/telemetry/tunnel_telem.py b/monkey/infection_monkey/telemetry/tunnel_telem.py deleted file mode 100644 index efe917643..000000000 --- a/monkey/infection_monkey/telemetry/tunnel_telem.py +++ /dev/null @@ -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} diff --git a/monkey/tests/unit_tests/infection_monkey/telemetry/test_tunnel_telem.py b/monkey/tests/unit_tests/infection_monkey/telemetry/test_tunnel_telem.py deleted file mode 100644 index eb18307ce..000000000 --- a/monkey/tests/unit_tests/infection_monkey/telemetry/test_tunnel_telem.py +++ /dev/null @@ -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"