From 3b2e255f35926755a51ff579fe1355d66c5464b9 Mon Sep 17 00:00:00 2001 From: Joe Neeman Date: Wed, 29 May 2024 17:14:35 -0500 Subject: [PATCH] Test simplifications --- tests/testsuite/registry_overlay.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/testsuite/registry_overlay.rs b/tests/testsuite/registry_overlay.rs index d46c782d62d6..722ccf10f130 100644 --- a/tests/testsuite/registry_overlay.rs +++ b/tests/testsuite/registry_overlay.rs @@ -28,8 +28,7 @@ fn simple_project() -> Project { authors = [] [dependencies] - bar = ">= 0.0.0" - baz = ">= 0.1.0" + baz = "0.1.0" "#, ) .file("src/main.rs", "fn main() {}") @@ -41,7 +40,6 @@ fn overlay_hit() { let (reg, alt_path) = setup(); let p = simple_project(); - Package::new("bar", "0.0.1").publish(); // baz is only in the local registry, but it gets found Package::new("baz", "0.1.1") .alternative(true) @@ -58,7 +56,6 @@ fn version_fallback() { let (reg, alt_path) = setup(); let p = simple_project(); - Package::new("bar", "0.0.1").publish(); // The one we want is in the main registry. Package::new("baz", "0.1.1").publish(); // An older version in the local registry doesn't confuse it. @@ -77,7 +74,6 @@ fn version_collision() { let (reg, alt_path) = setup(); let p = simple_project(); - Package::new("bar", "0.0.1").publish(); // The one we want is in the main registry. Package::new("baz", "0.1.1").publish(); Package::new("baz", "0.1.1") @@ -107,7 +103,6 @@ fn multiversion() { let (reg, alt_path) = setup(); let p = simple_project(); - Package::new("bar", "0.0.1").publish(); Package::new("baz", "0.1.1").dep("baz", "=0.0.1").publish(); Package::new("baz", "0.0.1") .alternative(true) @@ -145,13 +140,13 @@ fn alt_registry() { authors = [] [dependencies] - bar = { version = ">= 0.0.0", registry = "alternative" } - baz = { version = ">= 0.1.0", registry = "alternative" } + baz = { version = "0.1.0", registry = "alternative" } "#, ) .file("src/main.rs", "fn main() {}") .build(); + // This package isn't used, but publishing it forces the creation of the registry index. Package::new("bar", "0.0.1").local(true).publish(); Package::new("baz", "0.1.1").alternative(true).publish();