diff options
Diffstat (limited to 'crates/rocie-server/tests/_testenv/init.rs')
| -rw-r--r-- | crates/rocie-server/tests/_testenv/init.rs | 21 |
1 files changed, 15 insertions, 6 deletions
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() |
