Skip to main content

Module face

Module face 

Source
Expand description

FakeUpCloud — the mock’s in-process face on upcloud_api::UpCloudApi.

One world, two faces. crate::http’s socket is the face for terraform — a separate process that cannot hold a Rust trait object, which is the single legitimate reason for a wire-level fake. This is the face for Rust callers in the SAME process: every trait call becomes the same upcloud_api::Call the production wire sends (the path spelling lives in edda’s upcloud_api::over, once), and that call is handed to the same door the socket parser uses — [crate::http::answer]: the same router, the same Estate methods, the same guest engine, the same behaviour-63 heard bookkeeping, the same recorded calls. A fault armed once applies to both faces; a VM a Rust caller starts is the VM terraform then reads.

Nothing is re-implemented here, deliberately. A trait face that called Estate methods directly would be a SECOND interpretation of each request — the 202 on PUT /server, the 511 on a hotplug the guest kernel lacks, the 409 STORAGE_ATTACHED — and the first time the two disagreed, a Rust test would be green against a world terraform never sees.

Structs§

FakeUpCloud
The in-process face. Build it with FakeUpCloud::over and hold the result as an upcloud_api::UpCloudApi.

Constants§

IN_PROCESS_UPLOAD_BASE
Where an in-process mock’s upload sessions live. Not a host: nothing dials it.