Files
hyper/tests/integration.rs
2018-05-09 16:02:49 -07:00

151 lines
2.7 KiB
Rust

#![deny(warnings)]
#[macro_use]
mod support;
use self::support::*;
t! {
get_1,
client:
request:
uri: "/",
;
response:
status: 200,
;
server:
request:
uri: "/",
;
response:
;
}
t! {
get_implicit_path,
client:
request:
uri: "",
;
response:
status: 200,
;
server:
request:
uri: "/",
;
response:
;
}
t! {
get_body,
client:
request:
uri: "/",
;
response:
status: 200,
headers: {
"content-length" => 11,
},
body: "hello world",
;
server:
request:
uri: "/",
;
response:
headers: {
"content-length" => 11,
},
body: "hello world",
;
}
t! {
get_body_chunked,
client:
request:
uri: "/",
;
response:
status: 200,
headers: {
// h2 doesn't actually receive the transfer-encoding header
},
body: "hello world",
;
server:
request:
uri: "/",
;
response:
headers: {
// http2 should strip this header
"transfer-encoding" => "chunked",
},
body: "hello world",
;
}
t! {
post_chunked,
client:
request:
method: "POST",
uri: "/post_chunked",
headers: {
// http2 should strip this header
"transfer-encoding" => "chunked",
},
body: "hello world",
;
response:
;
server:
request:
method: "POST",
uri: "/post_chunked",
body: "hello world",
;
response:
;
}
t! {
get_2,
client:
request:
uri: "/1",
;
response:
status: 200,
;
request:
uri: "/2",
;
response:
status: 200,
;
server:
request:
uri: "/1",
;
response:
;
request:
uri: "/2",
;
response:
;
}
// In rare cases, the h2 client connection does not shutdown, resulting
// in this test simply hanging... :(
#[cfg(feature = "__internal_flaky_tests")]
t! {
http2_parallel_10,
parallel: 0..10
}