-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests and fixtures for new Cargo.lock format
In rust-lang/cargo#7070 the lockfile format was updated, instead of a top-level `[metadata]` key that holds the checksums for dependencies, these checksums are now specified in-line with the dependency. Since we shell out to `cargo` for most things, and in our tests only explicitly check for the presence of the `sha` values, this change is fairly minimal. I've opted to remove the checksums in most of our fixtures, as they are not strictly needed in our tests. I could have left them in there and things would still pass (`cargo` will silently upgrade them to the new format), however it seemed noisy.
- Loading branch information
Showing
28 changed files
with
16 additions
and
843 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,10 +95,14 @@ | |
expect(updated_lockfile_content). | ||
to include(%(name = "time"\nversion = "0.1.40")) | ||
expect(updated_lockfile_content).to include( | ||
"d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" | ||
<<~CHECKSUM | ||
checksum = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" | ||
CHECKSUM | ||
) | ||
expect(updated_lockfile_content).to_not include( | ||
"d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520" | ||
<<~CHECKSUM | ||
checksum = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520" | ||
CHECKSUM | ||
) | ||
end | ||
|
||
|
@@ -238,14 +242,6 @@ | |
"8d38a931b7e34f9da339c058cbbca6ded624ea58") | ||
expect(updated_lockfile_content).to_not include("git+https://") | ||
|
||
expect(updated_lockfile_content).to include( | ||
"[metadata]\n"\ | ||
'"checksum utf8-ranges 1.0.4 (git+ssh://[email protected]/'\ | ||
"BurntSushi/utf8-ranges)\" = \"<none>\"\n"\ | ||
'"checksum utf8-ranges-parent 1.0.2 (git+ssh://[email protected]/'\ | ||
"dependabot-fixtures/utf8-ranges)\" = \"<none>\"" | ||
) | ||
|
||
content = updated_lockfile_content | ||
expect(content.scan(/name = "utf8-ranges"/).count).to eq(1) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.