This commit is contained in:
@@ -41,16 +41,23 @@ def test_compose_defines_database_control_plane_and_outbound_host_agent() -> Non
|
||||
assert services["host-agent"]["environment"]["HOST_AGENT_IDENTITY_PATH"] == (
|
||||
"${HOST_AGENT_IDENTITY_PATH:-/app/tasks/host_identity.json}"
|
||||
)
|
||||
assert not (
|
||||
set(services["cloud-api"]["environment"])
|
||||
| set(services["host-agent"]["environment"])
|
||||
) & REMOVED_CREDENTIAL_SETTINGS
|
||||
assert (
|
||||
services["cloud-api"]["environment"][
|
||||
"CLOUD_PLANNER_DECISION_LOG_RETENTION_DAYS"
|
||||
]
|
||||
== "${CLOUD_PLANNER_DECISION_LOG_RETENTION_DAYS:-7}"
|
||||
)
|
||||
assert (
|
||||
not (
|
||||
set(services["cloud-api"]["environment"])
|
||||
| set(services["host-agent"]["environment"])
|
||||
)
|
||||
& REMOVED_CREDENTIAL_SETTINGS
|
||||
)
|
||||
|
||||
|
||||
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")
|
||||
)
|
||||
compose = yaml.safe_load((ROOT / "compose.deploy.yaml").read_text(encoding="utf-8"))
|
||||
services = compose["services"]
|
||||
|
||||
assert set(services) == {"postgres", "cloud-api"}
|
||||
@@ -63,10 +70,16 @@ def test_deploy_compose_has_only_cloud_services_and_required_environment() -> No
|
||||
),
|
||||
"CLOUD_TRUST_PROXY_HEADERS": "${CLOUD_TRUST_PROXY_HEADERS:-false}",
|
||||
"CLOUD_LLM_PROVIDER_ENCRYPTION_KEY": "${CLOUD_LLM_PROVIDER_ENCRYPTION_KEY}",
|
||||
"CLOUD_PLANNER_TOKEN_RESERVATION_CEILING": "${CLOUD_PLANNER_TOKEN_RESERVATION_CEILING:-4096}",
|
||||
"CLOUD_PLANNER_TOKEN_RESERVATION_TTL_SECONDS": "${CLOUD_PLANNER_TOKEN_RESERVATION_TTL_SECONDS:-300}",
|
||||
"CLOUD_PLANNER_DECISION_LOG_PRUNE_INTERVAL_SECONDS": "${CLOUD_PLANNER_DECISION_LOG_PRUNE_INTERVAL_SECONDS:-3600}",
|
||||
"CLOUD_PLANNER_DECISION_LOG_RETENTION_DAYS": "${CLOUD_PLANNER_DECISION_LOG_RETENTION_DAYS:-7}",
|
||||
}
|
||||
|
||||
|
||||
def test_container_uses_locked_workspace_install_migrations_and_static_console() -> None:
|
||||
def test_container_uses_locked_workspace_install_migrations_and_static_console() -> (
|
||||
None
|
||||
):
|
||||
dockerfile = (ROOT / "Dockerfile").read_text(encoding="utf-8")
|
||||
compose = yaml.safe_load((ROOT / "compose.yaml").read_text(encoding="utf-8"))
|
||||
cloud_command = compose["services"]["cloud-api"]["command"][-1]
|
||||
@@ -92,6 +105,14 @@ def test_example_environment_contains_no_static_credentials() -> None:
|
||||
"POSTGRES_PASSWORD",
|
||||
"CLOUD_API_PORT",
|
||||
"CLOUD_LLM_PROVIDER_ENCRYPTION_KEY",
|
||||
"CLOUD_PLANNER_TOKEN_RESERVATION_CEILING",
|
||||
"CLOUD_PLANNER_TOKEN_RESERVATION_TTL_SECONDS",
|
||||
"CLOUD_PLANNER_DECISION_LOG_PRUNE_INTERVAL_SECONDS",
|
||||
"CLOUD_PLANNER_DECISION_LOG_RETENTION_DAYS",
|
||||
}
|
||||
assert not set(values) & REMOVED_CREDENTIAL_SETTINGS
|
||||
assert values["CLOUD_LLM_PROVIDER_ENCRYPTION_KEY"].startswith("change-me-")
|
||||
assert values["CLOUD_PLANNER_TOKEN_RESERVATION_CEILING"] == "4096"
|
||||
assert values["CLOUD_PLANNER_TOKEN_RESERVATION_TTL_SECONDS"] == "300"
|
||||
assert values["CLOUD_PLANNER_DECISION_LOG_PRUNE_INTERVAL_SECONDS"] == "3600"
|
||||
assert values["CLOUD_PLANNER_DECISION_LOG_RETENTION_DAYS"] == "7"
|
||||
|
||||
Reference in New Issue
Block a user