From: Chris Swindle Date: Tue, 31 Oct 2017 16:00:21 +0000 (+0000) Subject: Updated tests based on review comments. X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~5^2~13^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3c7a3cb8ef6d2ac60d20ece6c230ac2e958725b1;p=cargo.git Updated tests based on review comments. --- diff --git a/tests/alt-registry.rs b/tests/alt-registry.rs old mode 100755 new mode 100644 index c7b937d89..3614d5140 --- a/tests/alt-registry.rs +++ b/tests/alt-registry.rs @@ -280,7 +280,8 @@ fn block_publish_due_to_no_token() { // Now perform the actual publish assert_that(p.cargo("publish").masquerade_as_nightly_cargo() .arg("--registry").arg("alternative").arg("-Zunstable-options"), - execs().with_status(101)); + execs().with_status(101) + .with_stderr_contains("error: no upload token found, please run `cargo login`")); } #[test] diff --git a/tests/login.rs b/tests/login.rs old mode 100755 new mode 100644 index 9aa356408..ee26411cf --- a/tests/login.rs +++ b/tests/login.rs @@ -23,9 +23,6 @@ const CONFIG_FILE: &str = r#" [registries.test-reg] index = "http://dummy_index/" - - [registries.test.reg] - index = "http://dummy_index/" "#; fn setup_old_credentials() { @@ -167,21 +164,3 @@ fn registry_credentials() { // Also ensure that we get the new token for the registry assert!(check_token(TOKEN, Some(reg))); } - -#[test] -fn registry_credentials_with_dots() { - setup_old_credentials(); - setup_new_credentials(); - - let reg = "test.reg"; - - assert_that(cargo_process().arg("login").masquerade_as_nightly_cargo() - .arg("--registry").arg(reg).arg(TOKEN).arg("-Zunstable-options"), - execs().with_status(0)); - - // Ensure that we have not updated the default token - assert!(check_token(ORIGINAL_TOKEN, None)); - - // Also ensure that we get the new token for the registry - assert!(check_token(TOKEN, Some(reg))); -} diff --git a/tests/publish.rs b/tests/publish.rs old mode 100755 new mode 100644