refactor(dpop): apply clippy

This commit is contained in:
Edouard Vanbelle
2026-08-09 02:03:54 +02:00
parent 97a56899df
commit d0712817c5
4 changed files with 20 additions and 4 deletions
@@ -4495,6 +4495,7 @@ mod phase4_gate_integration_tests {
svc.login(crate::application::dtos::user_dto::LoginDto {
username: email.clone(),
password: "s3cret-passphrase".to_string(),
dpop_jkt: None,
})
.await
.expect("baseline legacy login must succeed");
@@ -4512,6 +4513,7 @@ mod phase4_gate_integration_tests {
.login(crate::application::dtos::user_dto::LoginDto {
username: email.clone(),
password: "s3cret-passphrase".to_string(),
dpop_jkt: None,
})
.await
.expect_err("legacy login must be refused post-migration");
@@ -4535,6 +4537,7 @@ mod phase4_gate_integration_tests {
.login(crate::application::dtos::user_dto::LoginDto {
username: email.clone(),
password: "wrong-password".to_string(),
dpop_jkt: None,
})
.await
.expect_err("wrong password must still fail");
@@ -4551,6 +4554,7 @@ mod phase4_gate_integration_tests {
svc.login(crate::application::dtos::user_dto::LoginDto {
username: email,
password: "s3cret-passphrase".to_string(),
dpop_jkt: None,
})
.await
.expect("legacy login must succeed again after admin clear_registration");
+12 -4
View File
@@ -500,13 +500,19 @@ mod tests {
#[test]
fn content_serve_matches_thumbnail() {
assert!(get("/files/8f8e4390-1234-4a5b-8c9d-abcdef012345/thumbnail/icon"));
assert!(get("/files/8f8e4390-1234-4a5b-8c9d-abcdef012345/thumbnail/large"));
assert!(get(
"/files/8f8e4390-1234-4a5b-8c9d-abcdef012345/thumbnail/icon"
));
assert!(get(
"/files/8f8e4390-1234-4a5b-8c9d-abcdef012345/thumbnail/large"
));
}
#[test]
fn content_serve_matches_folder_zip() {
assert!(get("/folders/8f8e4390-1234-4a5b-8c9d-abcdef012345/download"));
assert!(get(
"/folders/8f8e4390-1234-4a5b-8c9d-abcdef012345/download"
));
}
#[test]
@@ -530,7 +536,9 @@ mod tests {
// Discovery endpoints (children, by-hash, search) MUST NOT be
// allowlisted — that's the whole security argument. Attacker
// needs to already know the UUID; can't enumerate.
assert!(!get("/folders/8f8e4390-1234-4a5b-8c9d-abcdef012345/children"));
assert!(!get(
"/folders/8f8e4390-1234-4a5b-8c9d-abcdef012345/children"
));
assert!(!get("/files/by-hash"));
assert!(!get("/search"));
assert!(!get("/auth/me"));