@@ -180,31 +180,6 @@ def test_keeps_current_version_when_higher_than_eligible(self) -> None:
180180 self .assertEqual (outputs ["version" ], "4.0.0-beta-3" )
181181 self .assertEqual (outputs ["published_at" ], "" )
182182
183- def test_updates_when_eligible_version_is_higher_than_current (self ) -> None :
184- result = self .run_script (
185- "select-maven" ,
186- "--now" ,
187- NOW ,
188- "--group-id" ,
189- "org.apache.maven.plugins" ,
190- "--artifact-id" ,
191- "maven-surefire-plugin" ,
192- "--search-response-file" ,
193- str (FIXTURES / "surefire-boundary.json" ),
194- "--prerelease-pattern" ,
195- "alpha" ,
196- "--prerelease-pattern" ,
197- "beta" ,
198- "--current-version" ,
199- "3.5.4" ,
200- )
201-
202- self .assertEqual (result .returncode , 0 , result .stderr )
203- outputs = self .parse_outputs (result .stdout )
204- self .assertEqual (outputs ["found" ], "true" )
205- self .assertEqual (outputs ["version" ], "3.5.5" )
206- self .assertEqual (outputs ["published_at" ], "2026-04-22" )
207-
208183 def test_keeps_current_version_when_no_eligible_version_exists (self ) -> None :
209184 result = self .run_script (
210185 "select-gradle" ,
@@ -303,22 +278,6 @@ def test_reverts_lockfile_when_any_changed_dependency_is_too_new(self) -> None:
303278 self .assertEqual (outputs ["reverted_files" ], "1" )
304279 self .assertEqual ((current_dir / "module/gradle.lockfile" ).read_text (encoding = "utf-8" ), baseline_content )
305280
306- def test_reverts_lockfile_when_one_of_multiple_coexisting_versions_is_too_new (self ) -> None :
307- baseline_content = "# lockfile\n com.typesafe:config:1.3.1=compileClasspath\n com.typesafe:config:1.4.4=runtimeClasspath\n "
308- current_content = "# lockfile\n com.typesafe:config:1.3.1=compileClasspath\n com.typesafe:config:1.5.0=runtimeClasspath\n "
309- metadata = {
310- "com.typesafe:config:1.5.0" : "2026-04-24T11:00:00Z" , # too new
311- }
312-
313- result , current_dir = self .run_validate_lockfiles (
314- baseline = {"module/gradle.lockfile" : baseline_content },
315- current = {"module/gradle.lockfile" : current_content },
316- metadata = metadata ,
317- )
318-
319- self .assertEqual (result .returncode , 0 , result .stderr )
320- self .assertEqual ((current_dir / "module/gradle.lockfile" ).read_text (encoding = "utf-8" ), baseline_content )
321-
322281 def test_removes_brand_new_lockfile_with_too_new_dependency (self ) -> None :
323282 # A brand-new module has no baseline counterpart — the lockfile should be removed.
324283 # So include an unchanged pre-existing lockfile in both baseline and current to satisfy
@@ -358,19 +317,6 @@ def test_reverts_lockfile_when_metadata_lookup_fails(self) -> None:
358317 self .assertIn ("::warning" , result .stdout )
359318 self .assertEqual ((current_dir / "module/gradle.lockfile" ).read_text (encoding = "utf-8" ), baseline_content )
360319
361- def test_fails_when_baseline_has_no_lockfiles_but_current_does (self ) -> None :
362- # empty baseline with lockfiles in current suggests the snapshot step failed
363- current_content = "# lockfile\n com.example:lib:1.0.0=runtimeClasspath\n "
364-
365- result , _ = self .run_validate_lockfiles (
366- baseline = {},
367- current = {"module/gradle.lockfile" : current_content },
368- metadata = {},
369- )
370-
371- self .assertEqual (result .returncode , 1 , result .stderr )
372- self .assertIn ("::error::Baseline has no lockfiles" , result .stdout )
373-
374320 def test_exits_cleanly_when_lockfiles_are_identical (self ) -> None :
375321 # no changes between baseline and current -> exit 0 with reverted_files=0
376322 content = "# lockfile\n com.example:lib:1.0.0=runtimeClasspath\n "
0 commit comments