Skip to content

Commit ed04601

Browse files
Merge #1542
1542: Temporarily disable the test requiring a user agent too r=sgrif a=carols10cents And clarify who should be pinging whom (readers of the code should ping the crates.io team) CI is currently broken; this should fix it. r? @sgrif Co-authored-by: Carol (Nichols || Goulding) <[email protected]>
2 parents 9a17c16 + 343ffb8 commit ed04601

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

src/middleware/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub fn build_middleware(app: Arc<App>, endpoints: R404) -> MiddlewareBuilder {
8888
}
8989
// Note: Temporarily disabled because cargo-vendor doesn't include a
9090
// User-Agent header and Rust's CI broke. If this is still commented out
91-
// by Nov 7, 2018 we need to ping some folks
91+
// by Nov 7, 2018 ping the crates.io team.
9292
// m.around(require_user_agent::RequireUserAgent::default());
9393

9494
if env != Env::Test {

src/tests/server.rs

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
use conduit::{Handler, Method};
1+
// Note: Temporarily disabled because cargo-vendor doesn't include a
2+
// User-Agent header and Rust's CI broke. If this is still commented out
3+
// by Nov 7, 2018 ping the crates.io team.
24

3-
use {app, req};
4-
5-
#[test]
6-
fn user_agent_is_required() {
7-
let (_b, _app, middle) = app();
8-
9-
let mut req = req(Method::Get, "/api/v1/crates");
10-
req.header("User-Agent", "");
11-
let resp = t!(middle.call(&mut req));
12-
assert_eq!(resp.status.0, 403);
13-
}
5+
// use conduit::{Handler, Method};
6+
//
7+
// use {app, req};
8+
//
9+
//
10+
// #[test]
11+
// fn user_agent_is_required() {
12+
// let (_b, _app, middle) = app();
13+
//
14+
// let mut req = req(Method::Get, "/api/v1/crates");
15+
// req.header("User-Agent", "");
16+
// let resp = t!(middle.call(&mut req));
17+
// assert_eq!(resp.status.0, 403);
18+
// }

0 commit comments

Comments
 (0)