Skip to content

Commit

Permalink
test secrets and logs url
Browse files Browse the repository at this point in the history
  • Loading branch information
a-leonardi committed Oct 6, 2023
1 parent d9178b6 commit 6b9cc2d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sekoia_automation/connector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ def configuration(self, configuration: dict) -> None:
sentry_sdk.set_context(
"connector_configuration", self._configuration.dict()
)
elif self._configuration:
sentry_sdk.set_context("connector_configuration", self._configuration)

def __init__(self, *args, **kwargs):
executor_max_worker = kwargs.pop("executor_max_worker", 4)
Expand Down
14 changes: 14 additions & 0 deletions tests/test_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,20 @@ def test_callback_url():
mock.assert_called_with(trigger.CALLBACK_URL_FILE_NAME)


def test_secrets_url():
trigger = DummyTrigger()
with patch.object(Module, "load_config", return_value="secrets") as mock:
assert trigger.secrets_url == "secrets"
mock.assert_called_with(trigger.SECRETS_URL_FILE_NAME)


def test_logs_url():
trigger = DummyTrigger()
with patch.object(Module, "load_config", return_value="logs") as mock:
assert trigger.logs_url == "logs"
mock.assert_called_with(trigger.LOGS_URL_FILE_NAME)


def test_trigger_configuration():
trigger = DummyTrigger()
with patch.object(
Expand Down

0 comments on commit 6b9cc2d

Please sign in to comment.