Skip to content

Commit 85ee13e

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 3fd1bfb commit 85ee13e

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
@@ -1106,7 +1106,7 @@ fn new_krate_with_readme() {
11061106

11071107
#[test]
11081108
fn new_krate_without_any_email_fails() {
1109-
let (app, _, _, token) = TestApp::with_proxy().with_token();
1109+
let (app, _, _, token) = TestApp::init().with_token();
11101110

11111111
app.db(|conn| {
11121112
delete(emails::table).execute(conn).unwrap();
@@ -1127,7 +1127,7 @@ fn new_krate_without_any_email_fails() {
11271127

11281128
#[test]
11291129
fn new_krate_with_unverified_email_fails() {
1130-
let (app, _, _, token) = TestApp::with_proxy().with_token();
1130+
let (app, _, _, token) = TestApp::init().with_token();
11311131

11321132
app.db(|conn| {
11331133
update(emails::table)
@@ -1241,7 +1241,7 @@ fn summary_new_crates() {
12411241
#[test]
12421242
fn download() {
12431243
use chrono::{Duration, Utc};
1244-
let (app, anon, user) = TestApp::with_proxy().with_user();
1244+
let (app, anon, user) = TestApp::init().with_user();
12451245
let user = user.as_model();
12461246

12471247
app.db(|conn| {
@@ -1293,7 +1293,7 @@ fn download() {
12931293

12941294
#[test]
12951295
fn download_nonexistent_version_of_existing_crate_404s() {
1296-
let (app, anon, user) = TestApp::with_proxy().with_user();
1296+
let (app, anon, user) = TestApp::init().with_user();
12971297
let user = user.as_model();
12981298

12991299
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)