4b6817381b
Benchmark image — build + push to ECR (any adapter) / build + push (push) Waiting to run
CI / quality (ubuntu-latest) (push) Waiting to run
CI / test (tools-runtime) (push) Waiting to run
CI / test (e2e-general) (push) Waiting to run
CI / test (cli-runtime) (push) Waiting to run
CI / test (e2e-provider-and-openclaw) (push) Waiting to run
CI / test (integrations-and-misc) (push) Waiting to run
CI / coverage-report (push) Blocked by required conditions
CI / test-kubernetes (push) Waiting to run
CI / should-run-thorough (push) Waiting to run
CI / test-thorough (cloudwatch-demo) (push) Blocked by required conditions
CI / test-thorough (flink-ecs) (push) Blocked by required conditions
CI / test-thorough (upstream-lambda) (push) Blocked by required conditions
CI / test-thorough (prefect-ecs-fargate) (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Release / build-binaries (zip, opensre.exe, onefile, windows-latest, windows-x64) (push) Blocked by required conditions
Release / publish-release (push) Blocked by required conditions
Release / publish-main-release (push) Blocked by required conditions
Release / prepare (push) Waiting to run
Release / verify (push) Blocked by required conditions
Release / build-python-dist (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-15-intel, darwin-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, macos-latest, darwin-arm64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04, linux-x64) (push) Blocked by required conditions
Release / build-binaries (tar.gz, opensre, onedir, ubuntu-22.04-arm, linux-arm64) (push) Blocked by required conditions
Synthetic Deterministic Tests / Synthetic offline (deterministic) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-checks (no-LLM) (push) Waiting to run
Interactive Shell Live (PR + post-merge) / turn-live shard ${{ matrix.shard_index }} (push) Waiting to run
CI (OpenClaw E2E) / openclaw test (push) Has been cancelled
91 lines
3.4 KiB
Python
91 lines
3.4 KiB
Python
"""Pytest configuration and fixtures for all tests."""
|
|
|
|
import os
|
|
|
|
from config.constants.paths import PROJECT_ROOT
|
|
from config.grafana_cloud import load_env
|
|
|
|
# Load repo-root .env (same as tests/conftest.py). This module is imported
|
|
# directly by e2e helpers, so env must be set here — not only via pytest hooks.
|
|
_ENV_PATH = PROJECT_ROOT / ".env"
|
|
|
|
|
|
def _load_env() -> None:
|
|
if _ENV_PATH.exists():
|
|
load_env(_ENV_PATH, override=True)
|
|
|
|
|
|
# Auto-load .env when this module is imported (pytest and direct execution).
|
|
_load_env()
|
|
|
|
|
|
def pytest_configure(config):
|
|
"""Pytest hook - keep env available for collection and execution."""
|
|
_load_env()
|
|
|
|
|
|
def get_test_config() -> dict:
|
|
"""Get test configuration (not a pytest fixture - plain function)."""
|
|
return {
|
|
"aws_region": os.getenv("AWS_REGION", "us-east-1"),
|
|
"remote_run_stream_url": os.getenv(
|
|
"OPENSRE_REMOTE_RUN_URL",
|
|
"http://localhost:8123/runs/stream",
|
|
),
|
|
}
|
|
|
|
|
|
# Default stream URLs for optional remote investigation harness tests.
|
|
REMOTE_RUN_LOCAL_STREAM_URL = os.getenv(
|
|
"OPENSRE_REMOTE_RUN_LOCAL_URL",
|
|
"http://127.0.0.1:2024/runs/stream",
|
|
)
|
|
_REMOTE_DEFAULT = os.getenv(
|
|
"OPENSRE_REMOTE_RUN_URL",
|
|
"https://tracer-agent-2026-e09h3n0zulnlz1-lwyjk39e.us-central1.run.app/agent/runs/stream",
|
|
)
|
|
REMOTE_RUN_REMOTE_STREAM_URL = _REMOTE_DEFAULT
|
|
|
|
|
|
# Upstream/Downstream Pipeline test case - AWS resources
|
|
def _load_upstream_downstream_config() -> dict:
|
|
"""Load config from SDK outputs or use CDK fallback."""
|
|
try:
|
|
from tests.shared.infrastructure_sdk.config import load_outputs
|
|
|
|
outputs = load_outputs("tracer-lambda")
|
|
return {
|
|
"stack_name": "tracer-lambda",
|
|
"ingester_api_url": outputs["IngesterApiUrl"],
|
|
"mock_api_url": outputs["MockApiUrl"],
|
|
"ingester_function_name": outputs["IngesterFunctionName"],
|
|
"mock_dag_function_name": outputs["MockDagFunctionName"],
|
|
"landing_bucket_name": outputs["LandingBucketName"],
|
|
"processed_bucket_name": outputs["ProcessedBucketName"],
|
|
}
|
|
except (FileNotFoundError, ImportError):
|
|
return {
|
|
"stack_name": "TracerUpstreamDownstreamTest",
|
|
"ingester_api_url": "https://ud9ogzmatj.execute-api.us-east-1.amazonaws.com/prod/",
|
|
"mock_api_url": "https://pf2u8sbgk7.execute-api.us-east-1.amazonaws.com/prod/",
|
|
"ingester_function_name": "TracerUpstreamDownstreamTes-IngesterLambda519919B4-swSsLumUC0KN",
|
|
"mock_dag_function_name": "TracerUpstreamDownstreamTest-MockDagLambdaCF347C20-3X8c3pPwK2Bq",
|
|
"landing_bucket_name": "tracerupstreamdownstreamtest-landingbucket23fe90fb-felup0en4mqb",
|
|
"processed_bucket_name": "tracerupstreamdownstreamte-processedbucketde59930c-bg5m6jrqoq6v",
|
|
}
|
|
|
|
|
|
UPSTREAM_DOWNSTREAM_CONFIG = _load_upstream_downstream_config()
|
|
|
|
|
|
# Prefect ECS Fargate test case - AWS resources
|
|
PREFECT_ECS_FARGATE_CONFIG = {
|
|
"stack_name": "TracerPrefectEcsFargate",
|
|
"trigger_api_url": "https://q5tl03u98c.execute-api.us-east-1.amazonaws.com/prod/",
|
|
"ecs_cluster_name": "tracer-prefect-cluster",
|
|
"log_group_name": "/ecs/tracer-prefect",
|
|
"trigger_lambda_name": "TracerPrefectEcsFargate-TriggerLambda2FDB819B-YCP5yvOvuE0l",
|
|
"landing_bucket_name": "tracerprefectecsfargate-landingbucket23fe90fb-woehzac5msvj",
|
|
"processed_bucket_name": "tracerprefectecsfargate-processedbucketde59930c-xwdkeidp0qsu",
|
|
}
|