Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions examples/issue-fix-pr-lifecycle-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from datetime import datetime, timezone
import json
import os
import re
import subprocess
import sys
Expand Down Expand Up @@ -70,14 +71,12 @@ def assert_public_safe(payload: dict[str, Any] | str) -> None:
def run_cli(
args: list[str],
*,
runtime_root: Path,
registry_path: Path | None = None,
runtime_root: Path | None = None,
) -> subprocess.CompletedProcess[str]:
control_plane_args: list[str] = []
control_plane_args = ["--runtime-root", str(runtime_root)]
if registry_path is not None:
control_plane_args.extend(["--registry", str(registry_path)])
if runtime_root is not None:
control_plane_args.extend(["--runtime-root", str(runtime_root)])
return subprocess.run(
[
sys.executable,
Expand All @@ -89,6 +88,7 @@ def run_cli(
*args,
],
cwd=ROOT,
env={**os.environ, "LOOPX_USAGE_PING": "0"},
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand Down Expand Up @@ -408,7 +408,8 @@ def check_lifecycle(provider: str) -> None:
"example-goal",
"--project",
str(project),
]
],
runtime_root=runtime_root,
)
cli_packet = json.loads(cli_result.stdout)
completed_before = datetime.now(timezone.utc).replace(microsecond=0)
Expand Down Expand Up @@ -445,7 +446,8 @@ def check_lifecycle(provider: str) -> None:
"--generated-at",
explicit_time,
"--no-write-domain-state",
]
],
runtime_root=runtime_root,
)
explicit_packet = json.loads(explicit_result.stdout)
assert explicit_packet["generated_at"] == explicit_time, explicit_packet
Expand Down
Loading