diff --git a/env_secrets/caprover_myvbv-prod.env b/env_secrets/caprover_myvbv-prod.env index 6c858195..e57d1105 100644 Binary files a/env_secrets/caprover_myvbv-prod.env and b/env_secrets/caprover_myvbv-prod.env differ diff --git a/env_secrets/caprover_myvbv-stage.env b/env_secrets/caprover_myvbv-stage.env index c70851f3..f5c2e32e 100644 Binary files a/env_secrets/caprover_myvbv-stage.env and b/env_secrets/caprover_myvbv-stage.env differ diff --git a/env_secrets/caprover_vbv-develop.env b/env_secrets/caprover_vbv-develop.env index 613e64d5..c633f417 100644 Binary files a/env_secrets/caprover_vbv-develop.env and b/env_secrets/caprover_vbv-develop.env differ diff --git a/env_secrets/local_daniel.env b/env_secrets/local_daniel.env index e42a71d1..7ae4f656 100644 Binary files a/env_secrets/local_daniel.env and b/env_secrets/local_daniel.env differ diff --git a/env_secrets/prod-azure.json b/env_secrets/prod-azure.json index f99f83cc..b8650182 100644 Binary files a/env_secrets/prod-azure.json and b/env_secrets/prod-azure.json differ diff --git a/server/config/settings/test_cypress_oauth.py b/server/config/settings/test_cypress_oauth.py new file mode 100644 index 00000000..4f17b0ce --- /dev/null +++ b/server/config/settings/test_cypress_oauth.py @@ -0,0 +1,39 @@ +# pylint: disable=unused-wildcard-import,wildcard-import,wrong-import-position +import os + +from dotenv import dotenv_values + +script_path = os.path.abspath(__file__) +script_dir = os.path.dirname(script_path) + +dev_env = dotenv_values(f"{script_dir}/../../../env_secrets/caprover_vbv-develop.env") + +os.environ["IT_APP_ENVIRONMENT"] = "local" + +takeover_settings = [ + "OAUTH_SIGNIN_CLIENT_ID", + "OAUTH_SIGNIN_CLIENT_SECRET", + "OAUTH_SIGNIN_URL", + "OAUTH_SIGNIN_REALM", + "OAUTH_SIGNIN_ADMIN_CLIENT_ID", + "OAUTH_SIGNIN_ADMIN_CLIENT_SECRET", + "OAUTH_SIGNIN_SERVER_METADATA_URL", +] + +for setting in takeover_settings: + os.environ[setting] = dev_env.get(setting) + +os.environ["OAUTH_SIGNUP_REDIRECT_URI"] = "http://localhost:8001/sso/login" +os.environ["OAUTH_SIGNIN_REDIRECT_URI"] = "http://localhost:8001/sso/callback" +os.environ["OAUTH_SYNC_ROLES"] = "true" + +os.environ["IT_APP_ENVIRONMENT"] = "local" +os.environ["AWS_S3_SECRET_ACCESS_KEY"] = os.environ.get( + "AWS_S3_SECRET_ACCESS_KEY", + "!!!default_for_quieting_cypress_within_pycharm!!!", +) + +from .test_cypress import * # noqa + +DATATRANS_API_ENDPOINT = "https://api.sandbox.datatrans.com" +DATATRANS_PAY_URL = "https://pay.sandbox.datatrans.com" diff --git a/server/conftest.py b/server/conftest.py index 74d55690..9690703f 100644 --- a/server/conftest.py +++ b/server/conftest.py @@ -2,6 +2,11 @@ import pytest from _pytest.runner import runtestprotocol +def pytest_ignore_collect(path, config): + if path.basename.startswith("test_cypress_"): + return True + + @pytest.hookimpl(tryfirst=True) def pytest_collection_modifyitems(config, items): parallel_items = []