From 73ead3bb261944fa0430e462c711d0543541676b Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 17 Jun 2022 12:10:43 -0400 Subject: [PATCH] Island: Rename set_configuration() -> store_configuration() --- .../cc/repository/file_agent_configuration_repository.py | 2 +- .../cc/repository/i_agent_configuration_repository.py | 2 +- .../cc/repository/test_file_agent_configuration_repository.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py b/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py index e9724aa4b..2cd2c8c93 100644 --- a/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py +++ b/monkey/monkey_island/cc/repository/file_agent_configuration_repository.py @@ -17,7 +17,7 @@ class FileAgentConfigurationRepository(IAgentConfigurationRepository): return self._schema.loads(configuration_json) - def set_configuration(self, agent_configuration: AgentConfiguration): + def store_configuration(self, agent_configuration: AgentConfiguration): configuration_json = self._schema.dumps(agent_configuration) self._file_repository.save_file( diff --git a/monkey/monkey_island/cc/repository/i_agent_configuration_repository.py b/monkey/monkey_island/cc/repository/i_agent_configuration_repository.py index 4129d119c..f91895c8b 100644 --- a/monkey/monkey_island/cc/repository/i_agent_configuration_repository.py +++ b/monkey/monkey_island/cc/repository/i_agent_configuration_repository.py @@ -18,7 +18,7 @@ class IAgentConfigurationRepository(ABC): pass @abstractmethod - def set_configuration(self, agent_configuration: AgentConfiguration): + def store_configuration(self, agent_configuration: AgentConfiguration): """ Store the agent configuration in the repository diff --git a/monkey/tests/unit_tests/monkey_island/cc/repository/test_file_agent_configuration_repository.py b/monkey/tests/unit_tests/monkey_island/cc/repository/test_file_agent_configuration_repository.py index bfb894913..941dd2586 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/repository/test_file_agent_configuration_repository.py +++ b/monkey/tests/unit_tests/monkey_island/cc/repository/test_file_agent_configuration_repository.py @@ -10,7 +10,7 @@ def test_store_agent_config(): schema = AgentConfigurationSchema() agent_configuration = schema.load(AGENT_CONFIGURATION) - repository.set_configuration(agent_configuration) + repository.store_configuration(agent_configuration) retrieved_agent_configuration = repository.get_configuration() assert retrieved_agent_configuration == agent_configuration