SIENTIAPDE-1646
Update project configuration and dependencies - Added .mypy_cache and .cursor to .gitignore. - Changed asyncio_default_fixture_loop_scope and asyncio_default_test_loop_scope to "session" in pyproject.toml. - Updated e2e testing dependencies in requirements-dev.txt, replacing fakeredis and mongomock with pytest-httpserver. - Updated requirements.txt to use sientia_do instead of a specific git commit. - Modified sonar-project.properties to remove a file from coverage exclusions. - Enhanced E2E test fixtures in e2e/conftest.py for better container management. - Cleaned up e2e test files related to CoreScouter and PIWebAPIScouter workflows.
This commit is contained in:
51
e2e/test_harness_smoke.py
Normal file
51
e2e/test_harness_smoke.py
Normal file
@@ -0,0 +1,51 @@
|
||||
"""Fast smoke checks for E2E fixture wiring."""
|
||||
|
||||
import pytest
|
||||
|
||||
from e2e.helpers import (
|
||||
apply_pi_web_api_server_config,
|
||||
load_scenario_input,
|
||||
make_workflow_id,
|
||||
start_and_await_workflow,
|
||||
)
|
||||
from e2e.pi_web_api_test_server import PIWebAPITestServer
|
||||
from scouter.workflow.pi_web_api_scouter import PIWebAPIScouter
|
||||
from temporalio.testing import WorkflowEnvironment
|
||||
from temporalio.worker import Worker
|
||||
|
||||
|
||||
@pytest.mark.e2e
|
||||
def test_postgres_schema_ready(postgres_engine):
|
||||
"""Verify autouse schema setup created laborious_data."""
|
||||
with postgres_engine.connect() as conn:
|
||||
count = conn.exec_driver_sql(
|
||||
'SELECT COUNT(*) FROM information_schema.tables '
|
||||
"WHERE table_schema = 'sientia_data' AND table_name = 'laborious_data'"
|
||||
).scalar()
|
||||
assert count == 1
|
||||
|
||||
|
||||
@pytest.mark.e2e
|
||||
def test_activities_construct(test_activities):
|
||||
"""Verify Activities initializes against testcontainers without hanging."""
|
||||
assert test_activities.redis_repository is not None
|
||||
assert test_activities.mongodb_repository is not None
|
||||
|
||||
|
||||
@pytest.mark.e2e
|
||||
@pytest.mark.asyncio
|
||||
async def test_temporal_pi_happy_path(
|
||||
temporal_env: WorkflowEnvironment,
|
||||
temporal_worker: Worker,
|
||||
pi_web_api_server: PIWebAPITestServer,
|
||||
):
|
||||
"""Minimal Temporal path: PIWebAPIScouter happy path completes."""
|
||||
scenario = load_scenario_input('pi_web_api_scouter_happy_path')
|
||||
apply_pi_web_api_server_config(pi_web_api_server, scenario.get('pi_web_api_server'))
|
||||
await start_and_await_workflow(
|
||||
temporal_env.client,
|
||||
PIWebAPIScouter.run,
|
||||
scenario['workflow_input'],
|
||||
make_workflow_id('smoke-pi-happy'),
|
||||
timeout=60.0,
|
||||
)
|
||||
Reference in New Issue
Block a user