Skip to content

Commit bc66a2d

Browse files
authored
Upgrade actix-web beta versions (#995)
1 parent f66296d commit bc66a2d

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

docs/book/content/advanced/dataloaders.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ DataLoader caching does not replace Redis, Memcache, or any other shared applica
4848

4949
```toml
5050
[dependencies]
51-
actix-identity = "0.4.0-beta.2"
51+
actix-identity = "0.4.0-beta.4"
5252
actix-rt = "1.0"
5353
actix-web = {version = "2.0", features = []}
5454
juniper = { git = "https://github.com/graphql-rust/juniper" }

examples/actix_subscriptions/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ authors = ["Mihai Dinculescu <[email protected]>"]
66
publish = false
77

88
[dependencies]
9-
actix-web = "4.0.0-beta.8"
10-
actix-cors = "0.6.0-beta.2"
9+
actix-web = "4.0.0-beta.12"
10+
actix-cors = "0.6.0-beta.4"
1111
futures = "0.3"
1212
env_logger = "0.9"
1313
serde = "1.0"

juniper_actix/Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ subscriptions = ["juniper_graphql_ws", "tokio"]
1313

1414
[dependencies]
1515
actix = "0.12"
16-
actix-http = "3.0.0-beta.8"
16+
actix-http = "3.0.0-beta.13"
1717
http = "0.2.4"
18-
actix-web = "4.0.0-beta.8"
19-
actix-web-actors = "4.0.0-beta.6"
18+
actix-web = "4.0.0-beta.12"
19+
actix-web-actors = "4.0.0-beta.7"
2020

2121
juniper = { version = "0.15.7", path = "../juniper", default-features = false }
2222
juniper_graphql_ws = { version = "0.3.0", path = "../juniper_graphql_ws", optional = true }
@@ -30,11 +30,11 @@ tokio = { version = "1.0", features = ["sync"], optional = true }
3030

3131
[dev-dependencies]
3232
actix-rt = "2"
33-
actix-cors = "0.6.0-beta.2"
34-
actix-identity = "0.4.0-beta.2"
33+
actix-cors = "0.6.0-beta.4"
34+
actix-identity = "0.4.0-beta.4"
3535
tokio = "1.0"
3636
async-stream = "0.3"
37-
actix-test = "0.1.0-beta.3"
37+
actix-test = "0.1.0-beta.6"
3838

3939
juniper = { version = "0.15.7", path = "../juniper", features = ["expose-test-schema"] }
4040

juniper_actix/src/lib.rs

+19-12
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,14 @@ pub mod subscriptions {
467467
#[cfg(test)]
468468
mod tests {
469469
use actix_http::body::AnyBody;
470-
use actix_web::{dev::ServiceResponse, http, http::header::CONTENT_TYPE, test, web::Data, App};
470+
use actix_web::{
471+
dev::ServiceResponse,
472+
http,
473+
http::header::CONTENT_TYPE,
474+
test::{self, TestRequest},
475+
web::Data,
476+
App,
477+
};
471478
use juniper::{
472479
http::tests::{run_http_test_suite, HttpIntegration, TestResponse},
473480
tests::fixtures::starwars::schema::{Database, Query},
@@ -509,7 +516,7 @@ mod tests {
509516
}
510517
let mut app =
511518
test::init_service(App::new().route("/", web::get().to(graphql_handler))).await;
512-
let req = test::TestRequest::get()
519+
let req = TestRequest::get()
513520
.uri("/")
514521
.append_header((ACCEPT, "text/html"))
515522
.to_request();
@@ -525,7 +532,7 @@ mod tests {
525532
}
526533
let mut app =
527534
test::init_service(App::new().route("/", web::get().to(graphql_handler))).await;
528-
let req = test::TestRequest::get()
535+
let req = TestRequest::get()
529536
.uri("/")
530537
.append_header((ACCEPT, "text/html"))
531538
.to_request();
@@ -550,7 +557,7 @@ mod tests {
550557
}
551558
let mut app =
552559
test::init_service(App::new().route("/", web::get().to(graphql_handler))).await;
553-
let req = test::TestRequest::get()
560+
let req = TestRequest::get()
554561
.uri("/")
555562
.append_header((ACCEPT, "text/html"))
556563
.to_request();
@@ -566,7 +573,7 @@ mod tests {
566573
}
567574
let mut app =
568575
test::init_service(App::new().route("/", web::get().to(graphql_handler))).await;
569-
let req = test::TestRequest::get()
576+
let req = TestRequest::get()
570577
.uri("/")
571578
.append_header((ACCEPT, "text/html"))
572579
.to_request();
@@ -589,7 +596,7 @@ mod tests {
589596
EmptySubscription::<Database>::new(),
590597
);
591598

592-
let req = test::TestRequest::post()
599+
let req = TestRequest::post()
593600
.append_header(("content-type", "application/json; charset=utf-8"))
594601
.set_payload(
595602
r##"{ "variables": null, "query": "{ hero(episode: NEW_HOPE) { name } }" }"##,
@@ -625,7 +632,7 @@ mod tests {
625632
EmptySubscription::<Database>::new(),
626633
);
627634

628-
let req = test::TestRequest::get()
635+
let req = TestRequest::get()
629636
.append_header(("content-type", "application/json"))
630637
.uri("/?query=%7B%20hero%28episode%3A%20NEW_HOPE%29%20%7B%20name%20%7D%20%7D&variables=null")
631638
.to_request();
@@ -663,7 +670,7 @@ mod tests {
663670
EmptySubscription::<Database>::new(),
664671
);
665672

666-
let req = test::TestRequest::post()
673+
let req = TestRequest::post()
667674
.append_header(("content-type", "application/json"))
668675
.set_payload(
669676
r##"[
@@ -705,7 +712,7 @@ mod tests {
705712
pub struct TestActixWebIntegration;
706713

707714
impl TestActixWebIntegration {
708-
fn make_request(&self, req: test::TestRequest) -> TestResponse {
715+
fn make_request(&self, req: TestRequest) -> TestResponse {
709716
actix_web::rt::System::new().block_on(async move {
710717
let schema = Schema::new(
711718
Query,
@@ -728,12 +735,12 @@ mod tests {
728735

729736
impl HttpIntegration for TestActixWebIntegration {
730737
fn get(&self, url: &str) -> TestResponse {
731-
self.make_request(test::TestRequest::get().uri(url))
738+
self.make_request(TestRequest::get().uri(url))
732739
}
733740

734741
fn post_json(&self, url: &str, body: &str) -> TestResponse {
735742
self.make_request(
736-
test::TestRequest::post()
743+
TestRequest::post()
737744
.append_header(("content-type", "application/json"))
738745
.set_payload(body.to_string())
739746
.uri(url),
@@ -742,7 +749,7 @@ mod tests {
742749

743750
fn post_graphql(&self, url: &str, body: &str) -> TestResponse {
744751
self.make_request(
745-
test::TestRequest::post()
752+
TestRequest::post()
746753
.append_header(("content-type", "application/graphql"))
747754
.set_payload(body.to_string())
748755
.uri(url),

0 commit comments

Comments
 (0)