Skip to content

Commit 9517c3e

Browse files
committed
Avoid initializing the playback proxy for a few remaining tests
This list was obtained by temporarily causing playback to panic if there was no `http-data` file when the proxy is started. The only remaining test that starts a proxy server which goes unused is `krate::yank_not_owner`, however this test does need an index. If more tests fall into this category over time we can switch to a full builder API for orchestrating a `TestApp` but that doesn't seem necessary yet.
1 parent df7122f commit 9517c3e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/tests/krate.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ fn new_krate_with_readme() {
10661066

10671067
#[test]
10681068
fn new_krate_without_any_email_fails() {
1069-
let (app, _, _, token) = TestApp::with_proxy().with_token();
1069+
let (app, _, _, token) = TestApp::init().with_token();
10701070

10711071
app.db(|conn| {
10721072
delete(emails::table).execute(conn).unwrap();
@@ -1087,7 +1087,7 @@ fn new_krate_without_any_email_fails() {
10871087

10881088
#[test]
10891089
fn new_krate_with_unverified_email_fails() {
1090-
let (app, _, _, token) = TestApp::with_proxy().with_token();
1090+
let (app, _, _, token) = TestApp::init().with_token();
10911091

10921092
app.db(|conn| {
10931093
update(emails::table)
@@ -1201,7 +1201,7 @@ fn summary_new_crates() {
12011201
#[test]
12021202
fn download() {
12031203
use chrono::{Duration, Utc};
1204-
let (app, anon, user) = TestApp::with_proxy().with_user();
1204+
let (app, anon, user) = TestApp::init().with_user();
12051205
let user = user.as_model();
12061206

12071207
app.db(|conn| {
@@ -1253,7 +1253,7 @@ fn download() {
12531253

12541254
#[test]
12551255
fn download_nonexistent_version_of_existing_crate_404s() {
1256-
let (app, anon, user) = TestApp::with_proxy().with_user();
1256+
let (app, anon, user) = TestApp::init().with_user();
12571257
let user = user.as_model();
12581258

12591259
app.db(|conn| {

src/tests/read_only_mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn cannot_hit_endpoint_which_writes_db_in_read_only_mode() {
3232

3333
#[test]
3434
fn can_download_crate_in_read_only_mode() {
35-
let (app, anon, user) = TestApp::with_proxy().with_user();
35+
let (app, anon, user) = TestApp::init().with_user();
3636

3737
app.db(|conn| {
3838
CrateBuilder::new("foo_download_read_only", user.as_model().id)

0 commit comments

Comments
 (0)