Skip to content

Commit

Permalink
test(publish): Verify version-exists error in dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 29, 2024
1 parent 15fbd2f commit 6019cf4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/testsuite/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,16 @@ fn duplicate_version() {
.file("src/main.rs", "fn main() {}")
.build();

p.cargo("publish --dry-run")
.replace_crates_io(registry_dupl.index_url())
.with_status(101)
.with_stderr_data(str![[r#"
[UPDATING] crates.io index
[ERROR] crate [email protected] already exists on crates.io index
"#]])
.run();

p.cargo("publish")
.replace_crates_io(registry_dupl.index_url())
.with_status(101)
Expand Down

0 comments on commit 6019cf4

Please sign in to comment.