Cleanup IT_OAUTH_*-env variables
This commit is contained in:
parent
86d0291448
commit
b323793a79
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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"
|
||||
|
|
@ -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 = []
|
||||
|
|
|
|||
Loading…
Reference in New Issue