Skip to content

Commit bffd16a

Browse files
committed
Make all test crates have unique names to prevent test deadlocks
1 parent c6de914 commit bffd16a

20 files changed

+207
-207
lines changed

src/tests/all.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ fn new_req_with_categories(app: Arc<App>, krate: Crate, version: &str,
290290
return req;
291291
}
292292

293-
fn new_req_body_foo_version_2() -> Vec<u8> {
294-
new_req_body(::krate("foo"), "2.0.0", Vec::new(), Vec::new(), Vec::new())
293+
fn new_req_body_version_2(krate: Crate) -> Vec<u8> {
294+
new_req_body(krate, "2.0.0", Vec::new(), Vec::new(), Vec::new())
295295
}
296296

297297
fn new_req_body(krate: Crate, version: &str, deps: Vec<u::CrateDependency>,

src/tests/http-data/krate_good_categories

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.0.0.crate HTTP/1.1
1+
===REQUEST 349
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_good_cat/foo_good_cat-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Authorization: AWS AKIAJF3GEK7N44BACDZA:GDxGb6r3SIqo9wXuzHrgMNWekwk=

src/tests/http-data/krate_ignored_categories

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.0.0.crate HTTP/1.1
1+
===REQUEST 355
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_ignored_cat/foo_ignored_cat-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Authorization: AWS AKIAJF3GEK7N44BACDZA:GDxGb6r3SIqo9wXuzHrgMNWekwk=

src/tests/http-data/krate_new_crate_owner

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.0.0.crate HTTP/1.1
1+
===REQUEST 344
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_owner/foo_owner-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Host: alexcrichton-test.s3.amazonaws.com
@@ -19,8 +19,8 @@ etag: "d41d8cd98f00b204e9800998ecf8427e"
1919
date: Sun, 28 Jun 2015 21:07:51 GMT
2020

2121

22-
===REQUEST 331
23-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-2.0.0.crate HTTP/1.1
22+
===REQUEST 344
23+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_owner/foo_owner-2.0.0.crate HTTP/1.1
2424
Accept: */*
2525
Proxy-Connection: Keep-Alive
2626
Authorization: AWS AKIAJF3GEK7N44BACDZA:wz9J18+QxEhMIqIDnzwP6fGGeGY=

src/tests/http-data/krate_new_krate

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.0.0.crate HTTP/1.1
1+
===REQUEST 339
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_new/foo_new-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Authorization: AWS AKIAJF3GEK7N44BACDZA:GDxGb6r3SIqo9wXuzHrgMNWekwk=

src/tests/http-data/krate_new_krate_git_upload

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.0.0.crate HTTP/1.1
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/fgt/fgt-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Host: alexcrichton-test.s3.amazonaws.com

src/tests/http-data/krate_new_krate_git_upload_appends

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/FOO/FOO-1.0.0.crate HTTP/1.1
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/FPP/FPP-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Authorization: AWS AKIAJF3GEK7N44BACDZA:mLugvy/BSBS8JgZ6pK7tURu3OTU=

src/tests/http-data/krate_new_krate_git_upload_with_conflicts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.0.0.crate HTTP/1.1
1+
===REQUEST 351
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_conflicts/foo_conflicts-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Authorization: AWS AKIAJF3GEK7N44BACDZA:GDxGb6r3SIqo9wXuzHrgMNWekwk=

src/tests/http-data/krate_new_krate_too_big_but_whitelisted

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 2334
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.1.0.crate HTTP/1.1
1+
===REQUEST 2354
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_whitelist/foo_whitelist-1.1.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Content-Type: application/x-tar

src/tests/http-data/krate_new_krate_twice

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-2.0.0.crate HTTP/1.1
1+
===REQUEST 343
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_twice/foo_twice-2.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Content-Length: 0

src/tests/http-data/krate_new_krate_weird_version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 335
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-0.0.0-pre.crate HTTP/1.1
1+
===REQUEST 347
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_weird/foo_weird-0.0.0-pre.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Host: alexcrichton-test.s3.amazonaws.com

src/tests/http-data/krate_new_krate_with_dependency

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/new/new-1.0.0.crate HTTP/1.1
1+
===REQUEST 339
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/new_dep/new_dep-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Date: Sun, 28 Jun 2015 14:07:18 -0700

src/tests/http-data/krate_yank

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
===REQUEST 331
2-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-1.0.0.crate HTTP/1.1
2+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/fyk/fyk-1.0.0.crate HTTP/1.1
33
Accept: */*
44
Proxy-Connection: Keep-Alive
55
Date: Sun, 28 Jun 2015 14:07:18 -0700

src/tests/http-data/team_publish_owned

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ cache-control: private, max-age=60, s-maxage=60
155155
x-content-type-options: nosniff
156156

157157
{"state":"active","url":"https://api.github.com/teams/1699377/memberships/crates-tester-1"}
158-
===REQUEST 331
159-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-2.0.0.crate HTTP/1.1
158+
===REQUEST 353
159+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_team_owned/foo_team_owned-2.0.0.crate HTTP/1.1
160160
Accept: */*
161161
Proxy-Connection: Keep-Alive
162162
Host: alexcrichton-test.s3.amazonaws.com

src/tests/http-data/team_remove_team_as_team_owner

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ x-frame-options: deny
194194
x-ratelimit-reset: 1439881924
195195

196196
{"state":"active","url":"https://api.github.com/teams/1699377/memberships/crates-tester-1"}
197-
===REQUEST 331
198-
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo/foo-2.0.0.crate HTTP/1.1
197+
===REQUEST 367
198+
PUT http://alexcrichton-test.s3.amazonaws.com/crates/foo_remove_team_owner/foo_remove_team_owner-2.0.0.crate HTTP/1.1
199199
Accept: */*
200200
Proxy-Connection: Keep-Alive
201201
Date: Mon, 17 Aug 2015 23:12:52 -0700

src/tests/keyword.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fn update_crate() {
6565
::json::<GoodKeyword>(&mut response).keyword.crates_cnt as usize
6666
};
6767
::mock_user(&mut req, ::user("foo"));
68-
let (krate, _) = ::mock_crate(&mut req, ::krate("foo"));
68+
let (krate, _) = ::mock_crate(&mut req, ::krate("fookey"));
6969
::mock_keyword(&mut req, "kw1");
7070
::mock_keyword(&mut req, "kw2");
7171

0 commit comments

Comments
 (0)