@@ -133,10 +133,10 @@ See [..]
133
133
validate_upload_foo ( ) ;
134
134
}
135
135
136
+ // Check that the `token` key works at the root instead of under a
137
+ // `[registry]` table.
136
138
#[ cargo_test]
137
139
fn old_token_location ( ) {
138
- // Check that the `token` key works at the root instead of under a
139
- // `[registry]` table.
140
140
let registry = registry:: init ( ) ;
141
141
142
142
let p = project ( )
@@ -787,9 +787,9 @@ The registry `alternative` is not listed in the `publish` value in Cargo.toml.
787
787
. run ( ) ;
788
788
}
789
789
790
+ // Explicitly setting `crates-io` in the publish list.
790
791
#[ cargo_test]
791
792
fn publish_with_crates_io_explicit ( ) {
792
- // Explicitly setting `crates-io` in the publish list.
793
793
let registry = registry:: init ( ) ;
794
794
795
795
let p = project ( )
@@ -1100,10 +1100,10 @@ include `--registry crates-io` to use crates.io
1100
1100
. run ( ) ;
1101
1101
}
1102
1102
1103
+ // A dependency with both `git` and `version`.
1103
1104
#[ cargo_test]
1104
1105
fn publish_git_with_version ( ) {
1105
1106
let registry = registry:: init ( ) ;
1106
- // A dependency with both `git` and `version`.
1107
1107
Package :: new ( "dep1" , "1.0.1" )
1108
1108
. file ( "src/lib.rs" , "pub fn f() -> i32 {1}" )
1109
1109
. publish ( ) ;
@@ -1345,10 +1345,10 @@ fn credentials_ambiguous_filename() {
1345
1345
validate_upload_foo ( ) ;
1346
1346
}
1347
1347
1348
+ // --index will not load registry.token to avoid possibly leaking
1349
+ // crates.io token to another server.
1348
1350
#[ cargo_test]
1349
1351
fn index_requires_token ( ) {
1350
- // --index will not load registry.token to avoid possibly leaking
1351
- // crates.io token to another server.
1352
1352
let registry = registry:: init ( ) ;
1353
1353
let credentials = paths:: home ( ) . join ( ".cargo/credentials" ) ;
1354
1354
fs:: remove_file ( & credentials) . unwrap ( ) ;
@@ -1380,9 +1380,9 @@ fn index_requires_token() {
1380
1380
. run ( ) ;
1381
1381
}
1382
1382
1383
+ // publish with source replacement without --registry
1383
1384
#[ cargo_test]
1384
1385
fn cratesio_source_replacement ( ) {
1385
- // publish with source replacement without --registry
1386
1386
registry:: init ( ) ;
1387
1387
let p = project ( )
1388
1388
. file (
@@ -1451,9 +1451,9 @@ Caused by:
1451
1451
. run ( ) ;
1452
1452
}
1453
1453
1454
+ // Registry returns an API error.
1454
1455
#[ cargo_test]
1455
1456
fn api_error_json ( ) {
1456
- // Registry returns an API error.
1457
1457
let _registry = registry:: RegistryBuilder :: new ( )
1458
1458
. alternative ( )
1459
1459
. http_api ( )
@@ -1498,9 +1498,9 @@ Caused by:
1498
1498
. run ( ) ;
1499
1499
}
1500
1500
1501
+ // Registry returns an API error with a 200 status code.
1501
1502
#[ cargo_test]
1502
1503
fn api_error_200 ( ) {
1503
- // Registry returns an API error with a 200 status code.
1504
1504
let _registry = registry:: RegistryBuilder :: new ( )
1505
1505
. alternative ( )
1506
1506
. http_api ( )
@@ -1545,9 +1545,9 @@ Caused by:
1545
1545
. run ( ) ;
1546
1546
}
1547
1547
1548
+ // Registry returns an error code without a JSON message.
1548
1549
#[ cargo_test]
1549
1550
fn api_error_code ( ) {
1550
- // Registry returns an error code without a JSON message.
1551
1551
let _registry = registry:: RegistryBuilder :: new ( )
1552
1552
. alternative ( )
1553
1553
. http_api ( )
@@ -1598,9 +1598,9 @@ Caused by:
1598
1598
. run ( ) ;
1599
1599
}
1600
1600
1601
+ // Registry has a network error.
1601
1602
#[ cargo_test]
1602
1603
fn api_curl_error ( ) {
1603
- // Registry has a network error.
1604
1604
let _registry = registry:: RegistryBuilder :: new ( )
1605
1605
. alternative ( )
1606
1606
. http_api ( )
@@ -1647,9 +1647,9 @@ Caused by:
1647
1647
. run ( ) ;
1648
1648
}
1649
1649
1650
+ // Registry returns an invalid response.
1650
1651
#[ cargo_test]
1651
1652
fn api_other_error ( ) {
1652
- // Registry returns an invalid response.
1653
1653
let _registry = registry:: RegistryBuilder :: new ( )
1654
1654
. alternative ( )
1655
1655
. http_api ( )
0 commit comments