forked from p15670423/monkey
UT: Add reset_to_default() to InMemoryAgentConfigurationRepository
This commit is contained in:
parent
e293639a22
commit
41b1c56fd0
|
@ -6,10 +6,14 @@ from monkey_island.cc.repository import IAgentConfigurationRepository
|
||||||
|
|
||||||
class InMemoryAgentConfigurationRepository(IAgentConfigurationRepository):
|
class InMemoryAgentConfigurationRepository(IAgentConfigurationRepository):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._configuration = AgentConfiguration.from_mapping(AGENT_CONFIGURATION)
|
self._default_configuration = AgentConfiguration.from_mapping(AGENT_CONFIGURATION)
|
||||||
|
self._configuration = self._default_configuration
|
||||||
|
|
||||||
def get_configuration(self):
|
def get_configuration(self):
|
||||||
return self._configuration
|
return self._configuration
|
||||||
|
|
||||||
def store_configuration(self, agent_configuration):
|
def store_configuration(self, agent_configuration):
|
||||||
self._configuration = agent_configuration
|
self._configuration = agent_configuration
|
||||||
|
|
||||||
|
def reset_to_default(self):
|
||||||
|
self._configuration = self._default_configuration
|
||||||
|
|
Loading…
Reference in New Issue