Island: Remove unnecessary resources/credentials subpackage

This commit is contained in:
Mike Salvatore 2022-07-11 14:51:20 -04:00
parent 7b1b9053e4
commit db74ea013d
7 changed files with 3 additions and 18 deletions

View File

@ -13,6 +13,7 @@ from monkey_island.cc.database import database, mongo
from monkey_island.cc.resources import (
AgentBinaries,
ClearSimulationData,
PropagationCredentials,
RemoteRun,
ResetAgentConfiguration,
)
@ -28,7 +29,6 @@ from monkey_island.cc.resources.blackbox.monkey_blackbox_endpoint import MonkeyB
from monkey_island.cc.resources.blackbox.telemetry_blackbox_endpoint import (
TelemetryBlackboxEndpoint,
)
from monkey_island.cc.resources.credentials.propagation_credentials import PropagationCredentials
from monkey_island.cc.resources.edge import Edge
from monkey_island.cc.resources.exploitations.manual_exploitation import ManualExploitation
from monkey_island.cc.resources.exploitations.monkey_exploitation import MonkeyExploitation
@ -185,7 +185,6 @@ def init_restful_endpoints(api: FlaskDIWrapper):
api.add_resource(FileUpload)
api.add_resource(PropagationCredentials)
api.add_resource(RemoteRun)
api.add_resource(VersionUpdate)
api.add_resource(StopAgentCheck)

View File

@ -2,3 +2,4 @@ from .remote_run import RemoteRun
from .agent_binaries import AgentBinaries
from .clear_simulation_data import ClearSimulationData
from .reset_agent_configuration import ResetAgentConfiguration
from .propagation_credentials import PropagationCredentials

View File

@ -1,15 +0,0 @@
import pytest
from tests.common import StubDIContainer
from tests.monkey_island import StubPropagationCredentialsRepository
from monkey_island.cc.repository import ICredentialsRepository
@pytest.fixture
def flask_client(build_flask_client):
container = StubDIContainer()
container.register(ICredentialsRepository, StubPropagationCredentialsRepository)
with build_flask_client(container) as flask_client:
yield flask_client

View File

@ -14,7 +14,7 @@ from tests.monkey_island import InMemoryCredentialsRepository
from common.credentials import Credentials
from monkey_island.cc.repository import ICredentialsRepository
from monkey_island.cc.resources.credentials.propagation_credentials import PropagationCredentials
from monkey_island.cc.resources import PropagationCredentials
ALL_CREDENTIALS_URL = PropagationCredentials.urls[0]
CONFIGURED_CREDENTIALS_URL = PropagationCredentials.urls[1]