From e2866755ebbdd28a14bd68597c7aad855de4ef96 Mon Sep 17 00:00:00 2001 From: Septias Date: Wed, 9 Jul 2025 14:37:15 +0200 Subject: [PATCH 1/2] fix: Add query to post for account creation This PR adds that the given request url is requested instead of only the path. This fixes the newly added test. close #6988 --- src/net/http.rs | 2 +- src/qr/qr_tests.rs | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/net/http.rs b/src/net/http.rs index 622c4c61be..942d2f172b 100644 --- a/src/net/http.rs +++ b/src/net/http.rs @@ -343,7 +343,7 @@ pub(crate) async fn post_empty(context: &Context, url: &str) -> Result<(String, .authority() .context("URL has no authority")? .clone(); - let req = hyper::Request::post(parsed_url.path()) + let req = hyper::Request::post(parsed_url) .header(hyper::header::HOST, authority.as_str()) .body(http_body_util::Empty::::new())?; diff --git a/src/qr/qr_tests.rs b/src/qr/qr_tests.rs index 01cb0edbec..17b4d32bbc 100644 --- a/src/qr/qr_tests.rs +++ b/src/qr/qr_tests.rs @@ -911,3 +911,15 @@ async fn test_decode_backup() -> Result<()> { Ok(()) } + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn test_import_acc() -> Result<()> { + let ctx = &TestContext::new().await; + set_account_from_qr( + ctx, + "dcaccount:https://mailadm.testrun.org/new_email?t=1s_7yjxykttyf7zhh3&n=1s", + ) + .await?; + + Ok(()) +} From f1245ce7c49754489f428c37f5937f300be60137 Mon Sep 17 00:00:00 2001 From: link2xt Date: Wed, 9 Jul 2025 18:16:11 +0000 Subject: [PATCH 2/2] Remove the test that depends on mailadm.testrun.org --- src/qr/qr_tests.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/qr/qr_tests.rs b/src/qr/qr_tests.rs index 17b4d32bbc..01cb0edbec 100644 --- a/src/qr/qr_tests.rs +++ b/src/qr/qr_tests.rs @@ -911,15 +911,3 @@ async fn test_decode_backup() -> Result<()> { Ok(()) } - -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn test_import_acc() -> Result<()> { - let ctx = &TestContext::new().await; - set_account_from_qr( - ctx, - "dcaccount:https://mailadm.testrun.org/new_email?t=1s_7yjxykttyf7zhh3&n=1s", - ) - .await?; - - Ok(()) -}