feat: add gitea agentic runtime control plane
This commit is contained in:
47
tests/acceptance/test_gitea_acceptance.py
Normal file
47
tests/acceptance/test_gitea_acceptance.py
Normal file
@@ -0,0 +1,47 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from engine.devops_agent.cli import main
|
||||
|
||||
|
||||
REQUIRED_ENV_VARS = (
|
||||
"GITEA_BASE_URL",
|
||||
"GITEA_REPO",
|
||||
"GITEA_TOKEN",
|
||||
"GITEA_ISSUE_NUMBER",
|
||||
)
|
||||
|
||||
|
||||
def test_gitea_acceptance_comment_flow() -> None:
|
||||
missing = [name for name in REQUIRED_ENV_VARS if not os.getenv(name)]
|
||||
if missing:
|
||||
pytest.skip(f"missing required env vars: {', '.join(missing)}")
|
||||
|
||||
output_dir = Path(".tmp/acceptance/gitea")
|
||||
output_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
exit_code = main(
|
||||
[
|
||||
"acceptance",
|
||||
"workflows/gitea-issue-delivery.md",
|
||||
"--base-url",
|
||||
os.environ["GITEA_BASE_URL"],
|
||||
"--repo",
|
||||
os.environ["GITEA_REPO"],
|
||||
"--token",
|
||||
os.environ["GITEA_TOKEN"],
|
||||
"--issue-number",
|
||||
os.environ["GITEA_ISSUE_NUMBER"],
|
||||
"--output-dir",
|
||||
str(output_dir),
|
||||
]
|
||||
)
|
||||
|
||||
artifact_path = output_dir / "run-artifact.json"
|
||||
|
||||
assert exit_code == 0
|
||||
assert artifact_path.exists()
|
||||
Reference in New Issue
Block a user