Skip to content

Commit

Permalink
test: don't compress test registry crates
Browse files Browse the repository at this point in the history
They are still nominally gzipped, but using `Compression::none()` makes
them consistent even across zlib and zlib-ng, and this fixes checksum
differences in the testsuite. There is a one-time update of all those
checksums to catch up with this change though.
  • Loading branch information
cuviper committed Apr 11, 2024
1 parent 74fd5bc commit a70f23c
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion crates/cargo-test-support/src/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1469,7 +1469,7 @@ impl Package {
let dst = self.archive_dst();
t!(fs::create_dir_all(dst.parent().unwrap()));
let f = t!(File::create(&dst));
let mut a = Builder::new(GzEncoder::new(f, Compression::default()));
let mut a = Builder::new(GzEncoder::new(f, Compression::none()));

if !self
.files
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/alt_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ dependencies = [
name = "foo"
version = "0.1.0"
source = "sparse+http://[..]/"
checksum = "f6a200a9339fef960979d94d5c99cbbfd899b6f5a396a55d9775089119050203""#,
checksum = "458c1addb23fde7dfbca0410afdbcc0086f96197281ec304d9e0e10def3cb899""#,
);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_add/locked_unchanged/in/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testsuite/cargo_add/lockfile_updated/in/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testsuite/cargo_add/lockfile_updated/out/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions tests/testsuite/cargo_remove/update_lock_file/in/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions tests/testsuite/cargo_remove/update_lock_file/out/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a70f23c

Please sign in to comment.