Use Foojay.io DISCO API to get latest Mandrel release

This commit is contained in:
Foivos Zakkak
2023-10-30 17:03:23 +02:00
committed by Fabio Niephaus
parent c2fd2d6d8e
commit 22b65d7de0
2 changed files with 65 additions and 9 deletions

View File

@@ -54,3 +54,19 @@ test('find latest', async () => {
expect(tag_name).toContain(mandrel.MANDREL_TAG_PREFIX)
})
test('get latest Mandrel for specific JDK', async () => {
// Test deprecated versions that won't get updates anymore
for (var combination of [
['11', '22.2.0.0-Final'],
['20', '23.0.1.2-Final']]) {
const latest = await mandrel.getLatestMandrelReleaseUrl(combination[0])
expect(latest).toContain(`mandrel-java${combination[0]}`)
expect(latest).toContain(combination[1])
}
// Test supported versions
for (var javaVersion of ['17', '21']) {
const latest = await mandrel.getLatestMandrelReleaseUrl(javaVersion)
expect(latest).toContain(`mandrel-java${javaVersion}`)
}
})