split http_all_proxy into two tests
@@ -895,27 +895,35 @@ fn proxy_https_proxy() {
}
#[test]
-fn proxy_all_proxy() {
+fn proxy_http_all_proxy() {
let server = server::http(|req| async move {
- assert_eq!(req.method(), "CONNECT");
+ assert_eq!(req.method(), "GET");
hyper::Response::builder()
.status(502)
.body("".into())
.unwrap()
});
- get_proxy_command("https", "all", &server.base_url())
+ get_proxy_command("http", "all", &server.base_url())
.assert()
- .stderr(contains("unsuccessful tunnel"))
+ .stdout(contains("HTTP/1.1 502 Bad Gateway"))
.failure();
+}
- server.assert_hits(1);
+#[test]
+fn proxy_https_all_proxy() {
+ let server = server::http(|req| async move {
+ assert_eq!(req.method(), "CONNECT");
+ hyper::Response::builder()
+ .status(502)
+ .body("".into())
+ .unwrap()
+ });
- get_proxy_command("http", "all", &server.base_url())
+ get_proxy_command("https", "all", &server.base_url())
.assert()
+ .stderr(contains("unsuccessful tunnel"))
.failure();
-
- server.assert_hits(1);
}
#[test]
