diff options
Diffstat (limited to 'tests/fixtures/mod.rs')
-rw-r--r-- | tests/fixtures/mod.rs | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/tests/fixtures/mod.rs b/tests/fixtures/mod.rs index a96a5b7..f95d4f6 100644 --- a/tests/fixtures/mod.rs +++ b/tests/fixtures/mod.rs @@ -121,34 +121,8 @@ where .arg("-p") .arg(port.to_string()) .args(args.clone()) - .stdout(Stdio::null()) - .spawn() - .expect("Couldn't run test binary"); - let is_tls = args - .into_iter() - .any(|x| x.as_ref().to_str().unwrap().contains("tls")); - - wait_for_port(port); - TestServer::new(port, tmpdir, child, is_tls) -} - -/// Same as `server()` but ignore stderr -#[fixture] -pub fn server_no_stderr<I>(#[default(&[] as &[&str])] args: I) -> TestServer -where - I: IntoIterator + Clone, - I::Item: AsRef<std::ffi::OsStr>, -{ - let port = port(); - let tmpdir = tmpdir(); - let child = Command::cargo_bin("miniserve") - .expect("Couldn't find test binary") - .arg(tmpdir.path()) - .arg("-p") - .arg(port.to_string()) - .args(args.clone()) - .stdout(Stdio::null()) - .stderr(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) .spawn() .expect("Couldn't run test binary"); let is_tls = args |