@@ -25,7 +25,7 @@ describe('findPackageForDownload', () => {
2525 [
2626 '20' ,
2727 '20' ,
28- 'https://download.oracle.com/java/20/latest /jdk-20_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
28+ 'https://download.oracle.com/java/20/archive /jdk-20_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
2929 ] ,
3030 [
3131 '20.0.1' ,
@@ -35,15 +35,15 @@ describe('findPackageForDownload', () => {
3535 [
3636 '17' ,
3737 '17' ,
38- 'https://download.oracle.com/java/17/latest /jdk-17_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
38+ 'https://download.oracle.com/java/17/archive /jdk-17_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
3939 ] ,
4040 [
4141 '17.0.1' ,
4242 '17.0.1' ,
4343 'https://download.oracle.com/java/17/archive/jdk-17.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
4444 ]
4545 ] ) ( 'version is %s -> %s' , async ( input , expectedVersion , expectedUrl ) => {
46- /* Needed only for this particular test because /latest/ urls tend to change */
46+ /* Needed only for this particular test because some urls might change */
4747 spyHttpClient = jest . spyOn ( HttpClient . prototype , 'head' ) ;
4848 spyHttpClient . mockReturnValue (
4949 Promise . resolve ( {
@@ -89,7 +89,7 @@ describe('findPackageForDownload', () => {
8989 }
9090 const archiveType = getDownloadArchiveExtension ( ) ;
9191 const result = await distro [ 'findPackageForDownload' ] ( version ) ;
92- const expectedUrl = `https://download.oracle.com/java/17/latest /jdk-17_${ osType } -${ distroArch } _bin.${ archiveType } ` ;
92+ const expectedUrl = `https://download.oracle.com/java/17/archive /jdk-17_${ osType } -${ distroArch } _bin.${ archiveType } ` ;
9393
9494 expect ( result . url ) . toBe ( expectedUrl ) ;
9595 }
@@ -102,8 +102,5 @@ describe('findPackageForDownload', () => {
102102 await expect ( distribution [ 'findPackageForDownload' ] ( '11' ) ) . rejects . toThrow (
103103 / O r a c l e J D K i s o n l y s u p p o r t e d f o r J D K 1 7 a n d l a t e r /
104104 ) ;
105- await expect ( distribution [ 'findPackageForDownload' ] ( '18' ) ) . rejects . toThrow (
106- / C o u l d n o t f i n d O r a c l e J D K f o r S e m V e r * /
107- ) ;
108105 } ) ;
109106} ) ;
0 commit comments