Updated tests based on review comments.
authorChris Swindle <christopher.swindle@metaswitch.com>
Tue, 31 Oct 2017 16:00:21 +0000 (16:00 +0000)
committerChris Swindle <christopher.swindle@metaswitch.com>
Tue, 31 Oct 2017 16:00:21 +0000 (16:00 +0000)
tests/alt-registry.rs [changed mode: 0755->0644]
tests/login.rs [changed mode: 0755->0644]
tests/publish.rs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index c7b937d..3614d51
@@ -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]
old mode 100755 (executable)
new mode 100644 (file)
index 9aa3564..ee26411
@@ -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)));
-}
old mode 100755 (executable)
new mode 100644 (file)