Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update test metadata for crate_universe #2599

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crate_universe/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ mod test {
.collect::<Vec<_>>(),
[
(&CrateId::new("log".to_owned(), Version::new(0, 3, 9)), false),
(&CrateId::new("log".to_owned(), Version::new(0, 4, 14)), false),
(&CrateId::new("log".to_owned(), Version::new(0, 4, 21)), false),
(&CrateId::new("names".to_owned(), Version::parse("0.12.1-dev").unwrap()), false),
(&CrateId::new("names".to_owned(), Version::new(0, 13, 0)), false),
(&CrateId::new("value-bag".to_owned(), Version::parse("1.0.0-alpha.7").unwrap()), false),
Expand Down
13 changes: 6 additions & 7 deletions crate_universe/src/context/crate_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ mod test {
let annotations = common_annotations();

let crate_annotation = &annotations.metadata.crates[&PackageId {
repr: "common 0.1.0 (path+file://{TEMP_DIR}/common)".to_owned(),
repr: "path+file://{TEMP_DIR}/common#0.1.0".to_owned(),
}];

let include_binaries = false;
Expand Down Expand Up @@ -833,7 +833,7 @@ mod test {
let annotations = common_annotations();

let package_id = PackageId {
repr: "common 0.1.0 (path+file://{TEMP_DIR}/common)".to_owned(),
repr: "path+file://{TEMP_DIR}/common#0.1.0".to_owned(),
};

let crate_annotation = &annotations.metadata.crates[&package_id];
Expand Down Expand Up @@ -908,7 +908,7 @@ mod test {
let annotations = build_script_annotations();

let package_id = PackageId {
repr: "openssl-sys 0.9.87 (registry+https://github.com/rust-lang/crates.io-index)"
repr: "registry+https://github.com/rust-lang/crates.io-index#[email protected]"
.to_owned(),
};

Expand Down Expand Up @@ -953,7 +953,7 @@ mod test {
let annotations = build_script_annotations();

let package_id = PackageId {
repr: "openssl-sys 0.9.87 (registry+https://github.com/rust-lang/crates.io-index)"
repr: "registry+https://github.com/rust-lang/crates.io-index#[email protected]"
.to_owned(),
};

Expand Down Expand Up @@ -988,8 +988,7 @@ mod test {
let annotations = crate_type_annotations();

let package_id = PackageId {
repr: "sysinfo 0.22.5 (registry+https://github.com/rust-lang/crates.io-index)"
.to_owned(),
repr: "registry+https://github.com/rust-lang/crates.io-index#[email protected]".to_owned(),
};

let crate_annotation = &annotations.metadata.crates[&package_id];
Expand Down Expand Up @@ -1024,7 +1023,7 @@ mod test {
) {
let mut annotations = common_annotations();
let crate_annotation = &annotations.metadata.crates[&PackageId {
repr: "common 0.1.0 (path+file://{TEMP_DIR}/common)".to_owned(),
repr: "path+file://{TEMP_DIR}/common#0.1.0".to_owned(),
}];
let include_binaries = false;
let include_build_scripts = false;
Expand Down
12 changes: 6 additions & 6 deletions crate_universe/src/metadata/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,10 @@ mod test {

assert_eq!(
BTreeSet::from([
"cc 1.0.72 (registry+https://github.com/rust-lang/crates.io-index)".to_owned(),
"pkg-config 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)"
"registry+https://github.com/rust-lang/crates.io-index#[email protected]".to_owned(),
"registry+https://github.com/rust-lang/crates.io-index#[email protected]"
.to_owned(),
"vcpkg 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)".to_owned()
"registry+https://github.com/rust-lang/crates.io-index#[email protected]".to_owned()
]),
build_deps,
);
Expand All @@ -518,9 +518,9 @@ mod test {

assert_eq!(
BTreeSet::from([
"libc 0.2.112 (registry+https://github.com/rust-lang/crates.io-index)".to_owned(),
"libz-sys 1.1.8 (registry+https://github.com/rust-lang/crates.io-index)".to_owned(),
"openssl-sys 0.9.87 (registry+https://github.com/rust-lang/crates.io-index)"
"registry+https://github.com/rust-lang/crates.io-index#[email protected]".to_owned(),
"registry+https://github.com/rust-lang/crates.io-index#[email protected]".to_owned(),
"registry+https://github.com/rust-lang/crates.io-index#[email protected]"
.to_owned(),
]),
normal_deps,
Expand Down
6 changes: 4 additions & 2 deletions crate_universe/src/metadata/metadata_annotation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ mod test {
.crates;
let tracing_core = crates
.iter()
.find(|(k, _)| k.repr.starts_with("tracing-core "))
.find(|(k, _)| k.repr.contains("#tracing-core@"))
.map(|(_, v)| v)
.unwrap();
match tracing_core {
Expand All @@ -556,7 +556,9 @@ mod test {
.unwrap()
.crates;

let package_id = PackageId { repr: "tracing 0.2.0 (git+https://github.com/tokio-rs/tracing.git?branch=master#1e09e50e8d15580b5929adbade9c782a6833e4a0)".into() };
let package_id = PackageId {
repr: "git+https://github.com/tokio-rs/tracing.git?branch=master#[email protected]".into(),
};
let annotation = crates.get(&package_id).unwrap();

let commitish = match annotation {
Expand Down
53 changes: 25 additions & 28 deletions crate_universe/test_data/metadata/aliases/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 crate_universe/test_data/metadata/aliases/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ path = "lib.rs"

[dependencies]
# Defines library targets
log = "=0.4.14"
log = "=0.4.21"
pinned_log = { package = "log", version = "=0.3.9" }

# Contains a transitive alias
Expand Down
Loading
Loading