Skip to content

Commit

Permalink
Change publish test to package test
Browse files Browse the repository at this point in the history
When run with the nightly toolchain, the `publish` test recently started failing with the following:
```
error: crate [email protected] already exists on crates.io index
```
I think this is the cause: https://github.com/rust-lang/cargo/blob/6ede1e2b276eaf93618765a08bd3ec2f0f44d955/src/cargo/ops/registry/publish.rs#L136

See, for example: https://github.com/rust-lang/cargo/pull/14550/files#r1763454347
  • Loading branch information
smoelius committed Sep 23, 2024
1 parent abbbaf2 commit 5ae8807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cargo-afl/tests/crates_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ fn cargo_afl_build_command(home: &Path, cargo_afl: &Path) -> Command {
}

#[test]
fn publish() {
fn package() {
for subdir in ["afl", "cargo-afl"] {
Command::new("cargo")
.args(["publish", "--allow-dirty", "--dry-run"])
.args(["package", "--allow-dirty"])
.current_dir(Path::new("..").join(subdir))
.assert()
.success();
Expand Down

0 comments on commit 5ae8807

Please sign in to comment.