@@ -25,7 +25,7 @@ describe('findPackageForDownload', () => {
25
25
[
26
26
'20' ,
27
27
'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}}'
29
29
] ,
30
30
[
31
31
'20.0.1' ,
@@ -35,15 +35,15 @@ describe('findPackageForDownload', () => {
35
35
[
36
36
'17' ,
37
37
'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}}'
39
39
] ,
40
40
[
41
41
'17.0.1' ,
42
42
'17.0.1' ,
43
43
'https://download.oracle.com/java/17/archive/jdk-17.0.1_{{OS_TYPE}}-x64_bin.{{ARCHIVE_TYPE}}'
44
44
]
45
45
] ) ( '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 */
47
47
spyHttpClient = jest . spyOn ( HttpClient . prototype , 'head' ) ;
48
48
spyHttpClient . mockReturnValue (
49
49
Promise . resolve ( {
@@ -89,7 +89,7 @@ describe('findPackageForDownload', () => {
89
89
}
90
90
const archiveType = getDownloadArchiveExtension ( ) ;
91
91
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 } ` ;
93
93
94
94
expect ( result . url ) . toBe ( expectedUrl ) ;
95
95
}
@@ -102,8 +102,5 @@ describe('findPackageForDownload', () => {
102
102
await expect ( distribution [ 'findPackageForDownload' ] ( '11' ) ) . rejects . toThrow (
103
103
/ 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 /
104
104
) ;
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
- ) ;
108
105
} ) ;
109
106
} ) ;
0 commit comments