Island: Add TODO to return default config in reporting

Notes in services for not fixing the failing tests until we remove
the ConfigService
This commit is contained in:
Ilija Lazoroski 2022-07-06 15:45:13 +02:00
parent 9b23cc0bef
commit 16e8443134
3 changed files with 7 additions and 2 deletions

View File

@ -392,6 +392,7 @@ class ReportService:
@staticmethod
def get_config_exploits():
exploits_config_value = EXPLOITER_CLASSES_PATH
# TODO: Return default config here
default_exploits = ConfigService.get_default_config(False)
for namespace in exploits_config_value:
default_exploits = default_exploits[namespace]

View File

@ -15,7 +15,9 @@ def PORT():
@pytest.fixture
def config(monkeypatch):
config = ConfigService.get_default_config(True)
# Note: ConfigService is going away, don't try to fix the UT using
# this fixture
config = ConfigService.get_config(True)
return config

View File

@ -14,7 +14,9 @@ fake_ip_address = "192.168.56.1"
def fake_mongo(monkeypatch, uses_encryptor):
mongo = mongoengine.connection.get_connection()
monkeypatch.setattr("monkey_island.cc.services.config.mongo", mongo)
config = ConfigService.get_default_config()
# Note: ConfigService is going away, don't try to fix UT using
# this fixture
config = ConfigService.get_config()
ConfigService.update_config(config, should_encrypt=True)