Skip to content

Commit

Permalink
Disable publish timeout for some tests
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
  • Loading branch information
hi-rustin committed Jan 30, 2023
1 parent f6cf5ab commit 59a3a7b
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/testsuite/alt_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,16 @@ or use environment variable CARGO_REGISTRIES_ALTERNATIVE_TOKEN",
#[cargo_test]
fn publish_to_alt_registry() {
registry::alt_init();
let p = project().file("src/main.rs", "fn main() {}").build();
let p = project()
.file("src/main.rs", "fn main() {}")
.file(
".cargo/config",
"
[publish]
timeout = 0
",
)
.build();

// Setup the registry by publishing a package
Package::new("bar", "0.0.1").alternative(true).publish();
Expand All @@ -425,7 +434,9 @@ fn publish_to_alt_registry() {
p.cargo("login --registry alternative TOKEN").run();

// Now perform the actual publish
p.cargo("publish --registry alternative").run();
p.cargo("publish --registry alternative -Zpublish-timeout")
.masquerade_as_nightly_cargo(&["publish-timeout"])
.run();

validate_alt_upload(
r#"{
Expand Down

0 comments on commit 59a3a7b

Please sign in to comment.