diff --git a/monkey/common/configuration/agent_configuration.py b/monkey/common/configuration/agent_configuration.py index f7b0c950e..2f4dfce2f 100644 --- a/monkey/common/configuration/agent_configuration.py +++ b/monkey/common/configuration/agent_configuration.py @@ -156,11 +156,13 @@ class ExploitationConfigurationSchema(Schema): @dataclass(frozen=True) class PropagationConfiguration: + maximum_depth: int network_scan: NetworkScanConfiguration exploitation: ExploitationConfiguration class PropagationConfigurationSchema(Schema): + maximum_depth = fields.Int() network_scan = fields.Nested(NetworkScanConfigurationSchema) exploitation = fields.Nested(ExploitationConfigurationSchema) diff --git a/monkey/tests/unit_tests/common/test_agent_configuration.py b/monkey/tests/unit_tests/common/test_agent_configuration.py index 2c10e646b..fb34b5211 100644 --- a/monkey/tests/unit_tests/common/test_agent_configuration.py +++ b/monkey/tests/unit_tests/common/test_agent_configuration.py @@ -181,6 +181,7 @@ def test_exploitation_configuration(): PROPAGATION_CONFIGURATION = { + "maximum_depth": 5, "network_scan": NETWORK_SCAN_CONFIGURATION, "exploitation": EXPLOITATION_CONFIGURATION, } @@ -195,5 +196,5 @@ def test_propagation_configuration(): assert isinstance(config, PropagationConfiguration) assert isinstance(config.network_scan, NetworkScanConfiguration) assert isinstance(config.exploitation, ExploitationConfiguration) - + assert config.maximum_depth == 5 assert config_dict == PROPAGATION_CONFIGURATION