aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fixtures/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fixtures/mod.rs')
-rw-r--r--tests/fixtures/mod.rs10
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/fixtures/mod.rs b/tests/fixtures/mod.rs
index 96b8002..f5231f7 100644
--- a/tests/fixtures/mod.rs
+++ b/tests/fixtures/mod.rs
@@ -12,7 +12,6 @@ use std::time::{Duration, Instant};
pub type Error = Box<dyn std::error::Error>;
/// File names for testing purpose
-#[allow(dead_code)]
pub static FILES: &[&str] = &[
"test.txt",
"test.html",
@@ -31,25 +30,20 @@ pub static FILES: &[&str] = &[
];
/// Hidden files for testing purpose
-#[allow(dead_code)]
pub static HIDDEN_FILES: &[&str] = &[".hidden_file1", ".hidden_file2"];
/// Directory names for testing purpose
-#[allow(dead_code)]
pub static DIRECTORIES: &[&str] = &["dira/", "dirb/", "dirc/"];
/// Hidden directories for testing purpose
-#[allow(dead_code)]
pub static HIDDEN_DIRECTORIES: &[&str] = &[".hidden_dir1/", ".hidden_dir2/"];
/// Name of a deeply nested file
-#[allow(dead_code)]
pub static DEEPLY_NESTED_FILE: &str = "very/deeply/nested/test.rs";
/// Test fixture which creates a temporary directory with a few files and directories inside.
/// The directories also contain files.
#[fixture]
-#[allow(dead_code)]
pub fn tmpdir() -> TempDir {
let tmpdir = assert_fs::TempDir::new().expect("Couldn't create a temp dir for tests");
let mut files = FILES.to_vec();
@@ -81,7 +75,6 @@ pub fn tmpdir() -> TempDir {
/// Get a free port.
#[fixture]
-#[allow(dead_code)]
pub fn port() -> u16 {
free_local_port().expect("Couldn't find a free local port")
}
@@ -89,7 +82,6 @@ pub fn port() -> u16 {
/// Run miniserve as a server; Start with a temporary directory, a free port and some
/// optional arguments then wait for a while for the server setup to complete.
#[fixture]
-#[allow(dead_code)]
pub fn server<I>(#[default(&[] as &[&str])] args: I) -> TestServer
where
I: IntoIterator + Clone,
@@ -116,7 +108,6 @@ where
/// Same as `server()` but ignore stderr
#[fixture]
-#[allow(dead_code)]
pub fn server_no_stderr<I>(#[default(&[] as &[&str])] args: I) -> TestServer
where
I: IntoIterator + Clone,
@@ -155,7 +146,6 @@ fn wait_for_port(port: u16) {
}
}
-#[allow(dead_code)]
pub struct TestServer {
port: u16,
tmpdir: TempDir,