From 31ff25d23944fa5f581d5e35a13bba0c37bd8ba6 Mon Sep 17 00:00:00 2001 From: YuryHrytsuk Date: Wed, 2 Aug 2023 10:36:34 +0200 Subject: [PATCH 1/3] Add TWILIO env to webserver --- services/docker-compose.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/services/docker-compose.yml b/services/docker-compose.yml index ee320d3634c..0fca18c6b38 100644 --- a/services/docker-compose.yml +++ b/services/docker-compose.yml @@ -334,6 +334,9 @@ services: LOGIN_REGISTRATION_INVITATION_REQUIRED: ${LOGIN_REGISTRATION_INVITATION_REQUIRED} LOGIN_2FA_REQUIRED: ${LOGIN_2FA_REQUIRED} LOGIN_2FA_CODE_EXPIRATION_SEC: ${LOGIN_2FA_CODE_EXPIRATION_SEC} + TWILIO_ACCOUNT_SID: ${TWILIO_ACCOUNT_SID} + TWILIO_AUTH_TOKEN: ${TWILIO_AUTH_TOKEN} + TWILIO_COUNTRY_CODES_W_ALPHANUMERIC_SID_SUPPORT: ${TWILIO_COUNTRY_CODES_W_ALPHANUMERIC_SID_SUPPORT} # WEBSERVER_REDIS REDIS_HOST: ${REDIS_HOST} From a6133773f05c26455b964b56099709e4da5d4aa2 Mon Sep 17 00:00:00 2001 From: YuryHrytsuk Date: Wed, 2 Aug 2023 11:47:47 +0200 Subject: [PATCH 2/3] Add TWILIO to local env --- .env-devel | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.env-devel b/.env-devel index cfd7401c6a8..4327c92a98a 100644 --- a/.env-devel +++ b/.env-devel @@ -158,6 +158,9 @@ LOGIN_REGISTRATION_CONFIRMATION_REQUIRED=0 LOGIN_REGISTRATION_INVITATION_REQUIRED=0 LOGIN_2FA_REQUIRED=0 LOGIN_2FA_CODE_EXPIRATION_SEC=60 +TWILIO_ACCOUNT_SID=DUMMY +TWILIO_AUTH_TOKEN=DUMMY +TWILIO_COUNTRY_CODES_W_ALPHANUMERIC_SID_SUPPORT=["41"] WEBSERVER_FRONTEND={} From 31392978ff1b3df52a01746cc47d5e1400050bb9 Mon Sep 17 00:00:00 2001 From: YuryHrytsuk Date: Wed, 2 Aug 2023 13:27:41 +0200 Subject: [PATCH 3/3] Remove deprecated test --- packages/settings-library/tests/test_twilio.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/settings-library/tests/test_twilio.py b/packages/settings-library/tests/test_twilio.py index 08ab303d9e6..95dec267793 100644 --- a/packages/settings-library/tests/test_twilio.py +++ b/packages/settings-library/tests/test_twilio.py @@ -2,8 +2,6 @@ # pylint: disable=unused-argument # pylint: disable=unused-variable -import pytest -from pydantic import ValidationError from pytest import MonkeyPatch from pytest_simcore.helpers.utils_envs import setenvs_from_dict from settings_library.twilio import TwilioSettings @@ -12,10 +10,6 @@ def test_twilio_settings_within_envdevel( mock_env_devel_environment: dict[str, str], monkeypatch: MonkeyPatch ): - # in .env-devel these are for the oment undefined - with pytest.raises(ValidationError): - TwilioSettings.create_from_envs() - # adds twilio credentials with monkeypatch.context() as patch: setenvs_from_dict(