Skip to content

Commit 51bcedb

Browse files
committed
Guard against new releases in UpdateSdkManTest
1 parent 74646a2 commit 51bcedb

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/test/java/org/openrewrite/java/migrate/UpdateSdkManTest.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,11 @@ void zuluNonCrac() {
157157
"""
158158
java=11.0.28-zulu
159159
""",
160-
"""
161-
java=17.0.16-zulu
162-
""",
163160
spec -> spec.path(".sdkmanrc")
161+
.after(str -> assertThat(str)
162+
.startsWith("java=17.0.")
163+
.endsWith("-zulu")
164+
.actual())
164165
)
165166
);
166167
}
@@ -173,10 +174,12 @@ void upgradeIfNewVersionIsStillSameVersionBasisAndSameDistribution() {
173174
"""
174175
java=21.0.6-zulu
175176
""",
176-
"""
177-
java=21.0.8-zulu
178-
""",
179177
spec -> spec.path(".sdkmanrc")
178+
.after(str -> assertThat(str)
179+
.startsWith("java=21.0.")
180+
.doesNotContain("21.0.6")
181+
.endsWith("-zulu")
182+
.actual())
180183
)
181184
);
182185
}

0 commit comments

Comments
 (0)