Skip to main content

prepare_test_cluster_env

Function prepare_test_cluster_env 

Source
pub fn prepare_test_cluster_env(
    cluster: &ClusterConfig,
) -> Result<String, String>
Expand description

Prepare the testing-cluster envelope (FLODL_TESTING_CLUSTER_JSON).

Mirrors prepare_cluster_env for the testing path: clones the cluster, probes device counts LOCALLY (no SSH — tests run in-process on the local host), populates ranks by sequential assignment, then serializes for shipping.

Returns the hex-encoded envelope ready to set in the env. Errors surface from cluster.validate() (structural), the local probe, or populate_ranks (count/worker mismatch).