mirror of
https://github.com/SigNoz/signoz.git
synced 2026-08-06 05:00:42 +01:00
* fix(alertmanager): resolve email SMTP settings from env * refactor(alertmanager): remove dead legacy config and tidy integration test helpers * test(alertmanager): scope smtp rotation test to env rotation only * chore: drop redundant test * chore: log and warn; do not persist global config
46 lines
1.5 KiB
Python
46 lines
1.5 KiB
Python
import logging
|
|
from http import HTTPStatus
|
|
|
|
import numpy as np
|
|
import requests
|
|
|
|
from fixtures import types
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def test_setup(signoz: types.SigNoz) -> None:
|
|
response = requests.get(signoz.self.host_configs["8080"].get("/api/v1/version"), timeout=2)
|
|
assert response.status_code == HTTPStatus.OK
|
|
|
|
healthz = requests.get(signoz.self.host_configs["8080"].get("/api/v2/healthz"), timeout=2)
|
|
logger.info("healthz response: %s", healthz.json())
|
|
assert healthz.status_code == HTTPStatus.OK
|
|
|
|
|
|
def test_telemetry_databases_exist(signoz: types.SigNoz) -> None:
|
|
arr: np.ndarray = signoz.telemetrystore.conn.query_np("SHOW DATABASES")
|
|
databases = arr.tolist() if arr.size > 0 else []
|
|
required_databases = [
|
|
"signoz_metrics",
|
|
"signoz_logs",
|
|
"signoz_traces",
|
|
"signoz_metadata",
|
|
"signoz_analytics",
|
|
"signoz_meter",
|
|
]
|
|
|
|
for db_name in required_databases:
|
|
assert any(db_name in str(db) for db in databases), f"Database {db_name} not found"
|
|
|
|
|
|
def test_teardown(
|
|
signoz: types.SigNoz, # pylint: disable=unused-argument
|
|
idp: types.TestContainerIDP, # pylint: disable=unused-argument
|
|
create_user_admin: types.Operation, # pylint: disable=unused-argument
|
|
migrator: types.Operation, # pylint: disable=unused-argument
|
|
maildev: types.TestContainerDocker, # pylint: disable=unused-argument
|
|
notification_channel: types.TestContainerDocker, # pylint: disable=unused-argument
|
|
) -> None:
|
|
pass
|