@@ -34,8 +34,11 @@ def test_lease_renews_while_execution_is_active() -> None:
|
||||
release_execution.wait(timeout=2)
|
||||
return AssignmentExecutionResult(status="done")
|
||||
|
||||
def latest_progress(self):
|
||||
return None
|
||||
|
||||
class RenewingClient:
|
||||
async def renew(self, assignment):
|
||||
async def renew(self, assignment, *, progress=None):
|
||||
renewed.set()
|
||||
return LeaseRenewalResponse(
|
||||
status="renewed",
|
||||
@@ -78,8 +81,11 @@ def test_stale_lease_stops_later_interruptible_actions() -> None:
|
||||
failure_reason="execution interrupted",
|
||||
)
|
||||
|
||||
def latest_progress(self):
|
||||
return None
|
||||
|
||||
class StaleClient:
|
||||
async def renew(self, assignment):
|
||||
async def renew(self, assignment, *, progress=None):
|
||||
assert await asyncio.to_thread(first_action_started.wait, 1)
|
||||
raise StaleLeaseError(409, "stale lease")
|
||||
|
||||
@@ -105,8 +111,11 @@ def test_renewal_loop_exits_when_execution_finishes() -> None:
|
||||
def execute(self, assignment, *, should_stop=None):
|
||||
return AssignmentExecutionResult(status="done")
|
||||
|
||||
def latest_progress(self):
|
||||
return None
|
||||
|
||||
class CountingClient:
|
||||
async def renew(self, assignment):
|
||||
async def renew(self, assignment, *, progress=None):
|
||||
nonlocal renew_calls
|
||||
renew_calls += 1
|
||||
return LeaseRenewalResponse(
|
||||
@@ -143,8 +152,11 @@ def test_shutdown_request_stops_active_execution_cooperatively() -> None:
|
||||
failure_reason="execution interrupted",
|
||||
)
|
||||
|
||||
def latest_progress(self):
|
||||
return None
|
||||
|
||||
class RenewingClient:
|
||||
async def renew(self, assignment):
|
||||
async def renew(self, assignment, *, progress=None):
|
||||
return LeaseRenewalResponse(
|
||||
status="renewed",
|
||||
lease_expires_at=datetime.now(UTC) + timedelta(seconds=30),
|
||||
|
||||
@@ -47,7 +47,7 @@ def test_compose_defines_database_control_plane_and_outbound_host_agent() -> Non
|
||||
) & REMOVED_CREDENTIAL_SETTINGS
|
||||
|
||||
|
||||
def test_deploy_compose_has_only_cloud_services_and_minimal_environment() -> None:
|
||||
def test_deploy_compose_has_only_cloud_services_and_required_environment() -> None:
|
||||
compose = yaml.safe_load(
|
||||
(ROOT / "compose.deploy.yaml").read_text(encoding="utf-8")
|
||||
)
|
||||
@@ -62,6 +62,7 @@ def test_deploy_compose_has_only_cloud_services_and_minimal_environment() -> Non
|
||||
"@postgres:5432/${POSTGRES_DB}"
|
||||
),
|
||||
"CLOUD_TRUST_PROXY_HEADERS": "${CLOUD_TRUST_PROXY_HEADERS:-false}",
|
||||
"CLOUD_LLM_PROVIDER_ENCRYPTION_KEY": "${CLOUD_LLM_PROVIDER_ENCRYPTION_KEY}",
|
||||
}
|
||||
|
||||
|
||||
@@ -90,5 +91,7 @@ def test_example_environment_contains_no_static_credentials() -> None:
|
||||
"POSTGRES_USER",
|
||||
"POSTGRES_PASSWORD",
|
||||
"CLOUD_API_PORT",
|
||||
"CLOUD_LLM_PROVIDER_ENCRYPTION_KEY",
|
||||
}
|
||||
assert not set(values) & REMOVED_CREDENTIAL_SETTINGS
|
||||
assert values["CLOUD_LLM_PROVIDER_ENCRYPTION_KEY"].startswith("change-me-")
|
||||
|
||||
Reference in New Issue
Block a user