diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-03-19 02:42:02 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-03-19 02:42:02 +0100 |
| commit | 6df299c87ba8faab75626d04392f874ec642c8dc (patch) | |
| tree | 64744ae2dea2c726d72589ce290e88679e60c564 /crates/rocie-server/tests/_testenv/init.rs | |
| parent | chore(rocie-client): Re-generate the client api (diff) | |
| download | server-6df299c87ba8faab75626d04392f874ec642c8dc.zip | |
feat(rocie-server): Provide default units (and other changes)
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() |
