Skip to content

Commit 3c7a3cb

Browse files
committed
Updated tests based on review comments.
1 parent 31cb68d commit 3c7a3cb

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

tests/alt-registry.rs

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ fn block_publish_due_to_no_token() {
280280
// Now perform the actual publish
281281
assert_that(p.cargo("publish").masquerade_as_nightly_cargo()
282282
.arg("--registry").arg("alternative").arg("-Zunstable-options"),
283-
execs().with_status(101));
283+
execs().with_status(101)
284+
.with_stderr_contains("error: no upload token found, please run `cargo login`"));
284285
}
285286

286287
#[test]

tests/login.rs

100755100644
Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ const CONFIG_FILE: &str = r#"
2323
2424
[registries.test-reg]
2525
index = "http://dummy_index/"
26-
27-
[registries.test.reg]
28-
index = "http://dummy_index/"
2926
"#;
3027

3128
fn setup_old_credentials() {
@@ -167,21 +164,3 @@ fn registry_credentials() {
167164
// Also ensure that we get the new token for the registry
168165
assert!(check_token(TOKEN, Some(reg)));
169166
}
170-
171-
#[test]
172-
fn registry_credentials_with_dots() {
173-
setup_old_credentials();
174-
setup_new_credentials();
175-
176-
let reg = "test.reg";
177-
178-
assert_that(cargo_process().arg("login").masquerade_as_nightly_cargo()
179-
.arg("--registry").arg(reg).arg(TOKEN).arg("-Zunstable-options"),
180-
execs().with_status(0));
181-
182-
// Ensure that we have not updated the default token
183-
assert!(check_token(ORIGINAL_TOKEN, None));
184-
185-
// Also ensure that we get the new token for the registry
186-
assert!(check_token(TOKEN, Some(reg)));
187-
}

tests/publish.rs

100755100644
File mode changed.

0 commit comments

Comments
 (0)