Code import - branch feature/SIENTIAPDE-1646

This commit is contained in:
2026-06-28 03:03:00 +00:00
commit 1be8c97e5a
87 changed files with 10783 additions and 0 deletions

51
e2e/test_harness_smoke.py Normal file
View 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,
)