From 6df299c87ba8faab75626d04392f874ec642c8dc Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Thu, 19 Mar 2026 02:42:02 +0100 Subject: feat(rocie-server): Provide default units (and other changes) --- crates/rocie-server/tests/_testenv/init.rs | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'crates/rocie-server/tests/_testenv/init.rs') diff --git a/crates/rocie-server/tests/_testenv/init.rs b/crates/rocie-server/tests/_testenv/init.rs index 4a169fe..758ca4e 100644 --- a/crates/rocie-server/tests/_testenv/init.rs +++ b/crates/rocie-server/tests/_testenv/init.rs @@ -21,7 +21,7 @@ use std::{ use rocie_client::{ apis::{api_set_no_auth_user_api::provision, configuration::Configuration}, - models::UserStub, + models::{ProvisionInfo, UserStub}, }; use crate::{ @@ -116,10 +116,15 @@ impl TestEnv { request!( env, - provision(UserStub { - description: Some("Test user, used during test runs".to_string()), - name: "rocie".to_string(), - password: "server".to_string() + provision(ProvisionInfo { + user: UserStub { + description: Some("Test user, used during test runs".to_string()), + name: "rocie".to_string(), + password: "server".to_string() + }, + // Don't use any default units. + // Otherwise we would need to update the tests every time we add new ones. + use_defaults: false, }) ); @@ -150,7 +155,11 @@ impl TestEnv { let mut stdout = BufReader::new(child.stdout.as_mut().expect("Was captured")); let mut port = String::new(); - assert_ne!(stdout.read_line(&mut port).expect("Works"), 0); + assert_ne!( + stdout.read_line(&mut port).expect("Works"), + 0, + "We should have been able to read the one line, the server printed" + ); port.trim_end() .parse() -- cgit 1.4.1