Skip to content

Commit

Permalink
Fix offline tests. Rename to cached/not_cached.
Browse files Browse the repository at this point in the history
  • Loading branch information
Revantus committed Mar 18, 2021
1 parent 8ae5472 commit 61a8f71
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/testsuite/offline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ Caused by:
}

#[cargo_test]
fn update_offline() {
fn update_offline_not_cached() {
let p = project()
.file(
"Cargo.toml",
Expand All @@ -350,7 +350,15 @@ fn update_offline() {
.build();
p.cargo("update --offline")
.with_status(101)
.with_stderr("error: you can't update in the offline mode[..]")
.with_stderr(
"\
[ERROR] no matching package named `bar` found
location searched: registry `[..]`
required by package `foo v0.0.1 ([..]/foo)`
As a reminder, you're using offline mode (--offline) which can sometimes cause \
surprising resolution failures, if this error is too confusing you may wish to \
retry without the offline flag.",
)
.run();
}

Expand Down Expand Up @@ -564,7 +572,7 @@ fn offline_with_all_patched() {
}

#[cargo_test]
fn offline_update() {
fn update_offline_cached() {
// Cache a few versions to update against
let p = project().file("src/lib.rs", "").build();
let versions = ["1.2.3", "1.2.5", "1.2.9"];
Expand Down

0 comments on commit 61a8f71

Please sign in to comment.