aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serve_request.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2021-08-29 23:16:20 +0000
committerGitHub <noreply@github.com>2021-08-29 23:16:20 +0000
commit6c7519292f029506947cfcd8d7eb3961b9657650 (patch)
treed10c65b3d8c7e1c8699c7542f53708bbb785c422 /tests/serve_request.rs
parentMerge pull request #585 from svenstaro/upload-artifact (diff)
parentFix stderr output in test index_fallback_to_listing (diff)
downloadminiserve-6c7519292f029506947cfcd8d7eb3961b9657650.tar.gz
miniserve-6c7519292f029506947cfcd8d7eb3961b9657650.zip
Merge pull request #586 from svenstaro/fix-warnings
Fix some warnings when building without TLS
Diffstat (limited to 'tests/serve_request.rs')
-rw-r--r--tests/serve_request.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/serve_request.rs b/tests/serve_request.rs
index 09a20d4..bbbb7d9 100644
--- a/tests/serve_request.rs
+++ b/tests/serve_request.rs
@@ -3,7 +3,8 @@ mod fixtures;
use assert_cmd::prelude::*;
use assert_fs::fixture::TempDir;
use fixtures::{
- port, server, tmpdir, Error, TestServer, DIRECTORIES, FILES, HIDDEN_DIRECTORIES, HIDDEN_FILES,
+ port, server, server_no_stderr, tmpdir, Error, TestServer, DIRECTORIES, FILES,
+ HIDDEN_DIRECTORIES, HIDDEN_FILES,
};
use http::StatusCode;
use regex::Regex;
@@ -222,8 +223,8 @@ fn serves_requests_custom_index_notice(tmpdir: TempDir, port: u16) -> Result<(),
}
#[rstest]
-#[case(server(&["--index", FILES[0]]))]
-#[case(server(&["--index", "does-not-exist.html"]))]
+#[case(server_no_stderr(&["--index", FILES[0]]))]
+#[case(server_no_stderr(&["--index", "does-not-exist.html"]))]
fn index_fallback_to_listing(#[case] server: TestServer) -> Result<(), Error> {
// If index file is not found, show directory listing instead.
// both cases should return `Ok`