Skip to content

Commit 0139171

Browse files
committed
cleanup oidc tests deps
1 parent 36c0374 commit 0139171

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

Cargo.lock

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,12 @@ default = []
8787
odbc-static = ["odbc-sys", "odbc-sys/vendored-unix-odbc"]
8888
lambda-web = ["dep:lambda-web", "odbc-static"]
8989

90+
[dev-dependencies]
91+
actix-http = "3"
92+
9093
[build-dependencies]
9194
awc = { version = "3", features = ["rustls-0_23-webpki-roots"] }
9295
rustls = "0.23"
9396
actix-rt = "2.8"
9497
libflate = "2"
95-
futures-util = "0.3.21"
96-
97-
[dev-dependencies]
98-
actix-http = "3.11.2"
99-
actix-service = "2.0.3"
98+
futures-util = "0.3.21"

tests/oidc/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
use actix_http::Request;
2-
use actix_service::Service;
32
use actix_web::{
43
body::MessageBody,
54
cookie::Cookie,
6-
dev::ServiceResponse,
5+
dev::{Service, ServiceResponse},
76
http::{header, StatusCode},
87
test,
98
web::{self, Data},
@@ -254,7 +253,7 @@ impl FakeOidcProvider {
254253

255254
async fn make_request_with_session<S, B>(
256255
app: &S,
257-
mut req: actix_web::test::TestRequest,
256+
mut req: test::TestRequest,
258257
cookies: &mut Vec<Cookie<'static>>,
259258
) -> ServiceResponse<B>
260259
where
@@ -264,7 +263,7 @@ where
264263
for cookie in cookies.iter() {
265264
req = req.cookie(cookie.clone());
266265
}
267-
let resp = req.send_request(app).await;
266+
let resp = test::call_service(app, req.to_request()).await;
268267

269268
for new_cookie in extract_set_cookies(resp.headers()) {
270269
cookies.retain(|c| c.name() != new_cookie.name());

0 commit comments

Comments
 (0)