mirror of
https://github.com/getsentry/self-hosted.git
synced 2025-12-08 19:46:14 +00:00
From ``` ================== 11 passed, 4 warnings in 762.35s (0:12:42) ================== ``` to ``` ================== 11 passed, 4 warnings in 343.58s (0:05:43) ================== ```
42 lines
959 B
Python
42 lines
959 B
Python
import os
|
|
from os.path import join
|
|
import subprocess
|
|
|
|
import pytest
|
|
|
|
SENTRY_CONFIG_PY = "sentry/sentry.conf.py"
|
|
SENTRY_TEST_HOST = os.getenv("SENTRY_TEST_HOST", "http://localhost:9000")
|
|
TEST_USER = "test@example.com"
|
|
TEST_PASS = "test123TEST"
|
|
|
|
|
|
@pytest.fixture(scope="session", autouse=True)
|
|
def configure_self_hosted_environment(request):
|
|
# Create test user
|
|
subprocess.run(
|
|
[
|
|
"docker",
|
|
"compose",
|
|
"exec",
|
|
"-T",
|
|
"web",
|
|
"sentry",
|
|
"createuser",
|
|
"--force-update",
|
|
"--superuser",
|
|
"--email",
|
|
TEST_USER,
|
|
"--password",
|
|
TEST_PASS,
|
|
"--no-input",
|
|
],
|
|
check=True,
|
|
text=True,
|
|
)
|
|
|
|
|
|
@pytest.fixture()
|
|
def setup_backup_restore_env_variables():
|
|
os.environ["SENTRY_DOCKER_IO_DIR"] = os.path.join(os.getcwd(), "sentry")
|
|
os.environ["SKIP_USER_CREATION"] = "1"
|