feat: add Python integration tests for HTTP endpoints
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run integration tests for pipeline-runner."""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
project_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
tests_dir = os.path.join(project_dir, "tests")
|
||||
|
||||
# Build in FAKE mode first
|
||||
build_script = os.path.join(project_dir, "build.sh")
|
||||
print("==> Building in FAKE mode...")
|
||||
result = subprocess.run([build_script, "--fake"], cwd=project_dir)
|
||||
if result.returncode != 0:
|
||||
print("Build failed", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# Run pytest
|
||||
print("==> Running integration tests...")
|
||||
result = subprocess.run(
|
||||
[sys.executable, "-m", "pytest", tests_dir, "-v"],
|
||||
cwd=project_dir,
|
||||
)
|
||||
sys.exit(result.returncode)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user