-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathrun_integration_tests.py
More file actions
executable file
·39 lines (31 loc) · 1.22 KB
/
run_integration_tests.py
File metadata and controls
executable file
·39 lines (31 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python3
"""
Integration test runner for the EdgeX Python SDK.
"""
import os
import sys
import subprocess
import logging
from tests.integration.config import check_env_vars
# Configure logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
logger = logging.getLogger(__name__)
# Check if required environment variables are set
env_status = check_env_vars()
if not env_status["all_set"]:
missing_vars = env_status["missing_vars"]
logger.error(f"Cannot run integration tests because the following environment variables are not set: {', '.join(missing_vars)}")
logger.error("Please set these environment variables and try again.")
sys.exit(1)
# Set the StarkEx signing adapter in the environment
# os.environ["EDGEX_SIGNING_ADAPTER"] = "starkex"
# Log information about the signing adapter
logger.info("Running integration tests with the StarkEx signing adapter.")
logger.info("This means that cryptographic operations are performed using the actual Stark curve implementation.")
# Run the integration tests as a module
result = subprocess.run([sys.executable, "-m", "tests.integration"])
# Exit with the same exit code
sys.exit(result.returncode)