remove that stupid bad passwords file

main
_ 2022-04-20 12:31:35 +00:00
parent c2299ab39a
commit da581f452d
2 changed files with 0 additions and 40 deletions

File diff suppressed because one or more lines are too long

View File

@ -80,22 +80,12 @@ fn file_server () {
use internal::Response::*; use internal::Response::*;
use crate::file_server::FileServerError; use crate::file_server::FileServerError;
let bad_passwords_path = "/files/src/bad_passwords.txt";
for (uri_path, expected) in vec! [ for (uri_path, expected) in vec! [
("/", Root), ("/", Root),
("/files", NotFound), ("/files", NotFound),
("/files/?", InvalidQuery), ("/files/?", InvalidQuery),
("/files/src", Redirect ("src/".to_string ())), ("/files/src", Redirect ("src/".to_string ())),
("/files/src/?", InvalidQuery), ("/files/src/?", InvalidQuery),
(bad_passwords_path, ServeFile (internal::ServeFileParams {
send_body: true,
range: range::ValidParsed {
range: 0..1_048_576,
range_requested: false,
},
file: AlwaysEqual::testing_blank (),
})),
("/files/test/test.md", ServeFile (internal::ServeFileParams { ("/files/test/test.md", ServeFile (internal::ServeFileParams {
send_body: true, send_body: true,
range: range::ValidParsed { range: range::ValidParsed {
@ -132,35 +122,6 @@ fn file_server () {
checker (resp.unwrap_err ()); checker (resp.unwrap_err ());
} }
let resp = internal::serve_all (
file_server_root,
Method::Get,
bad_passwords_path,
&hashmap! {
"range".into () => b"bytes=0-2000000".to_vec (),
},
None
).await;
assert_eq! (resp.expect ("Should be Ok (_)"), RangeNotSatisfiable (1_048_576));
let resp = internal::serve_all (
file_server_root,
Method::Head,
bad_passwords_path,
&headers,
None
).await;
assert_eq! (resp.expect ("Should be Ok (_)"), ServeFile (internal::ServeFileParams {
send_body: false,
range: range::ValidParsed {
range: 0..1_048_576,
range_requested: false,
},
file: AlwaysEqual::testing_blank (),
}));
} }
}); });
} }