2021-12-07 08:57:12 -08:00
|
|
|
import os
|
2021-11-02 12:42:53 -07:00
|
|
|
|
|
|
|
import pytest
|
2022-06-30 16:00:50 +05:30
|
|
|
|
2022-08-10 17:04:28 +05:30
|
|
|
from tests.utils import wait_for_healthcheck_util, get_frontend_session
|
2022-08-06 05:05:23 +05:30
|
|
|
from tests.test_result_msg import send_message
|
2021-11-02 12:42:53 -07:00
|
|
|
|
2021-12-07 08:57:12 -08:00
|
|
|
# Disable telemetry
|
2022-08-06 05:05:23 +05:30
|
|
|
os.environ["DATAHUB_TELEMETRY_ENABLED"] = "false"
|
2021-12-07 08:57:12 -08:00
|
|
|
|
2022-06-30 16:00:50 +05:30
|
|
|
|
2021-11-02 12:42:53 -07:00
|
|
|
@pytest.fixture(scope="session")
|
|
|
|
def wait_for_healthchecks():
|
2022-07-14 22:04:06 +05:30
|
|
|
wait_for_healthcheck_util()
|
2021-11-02 12:42:53 -07:00
|
|
|
yield
|
|
|
|
|
2022-06-30 16:00:50 +05:30
|
|
|
|
2021-11-02 12:42:53 -07:00
|
|
|
@pytest.fixture(scope="session")
|
|
|
|
def frontend_session(wait_for_healthchecks):
|
2022-08-10 17:04:28 +05:30
|
|
|
yield get_frontend_session()
|
2021-11-02 12:42:53 -07:00
|
|
|
|
2022-06-30 16:00:50 +05:30
|
|
|
|
2021-11-02 12:42:53 -07:00
|
|
|
# TODO: Determine whether we need this or not.
|
|
|
|
@pytest.mark.dependency()
|
|
|
|
def test_healthchecks(wait_for_healthchecks):
|
|
|
|
# Call to wait_for_healthchecks fixture will do the actual functionality.
|
2022-06-30 16:00:50 +05:30
|
|
|
pass
|
2022-08-06 05:05:23 +05:30
|
|
|
|
|
|
|
|
|
|
|
def pytest_sessionfinish(session, exitstatus):
|
|
|
|
""" whole test run finishes. """
|
|
|
|
send_message(exitstatus)
|