Skip to content

Commit 57f8c48

Browse files
committed
test(MongoBinaryDownloadUrl): update ubuntu test names
1 parent a97656d commit 57f8c48

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

packages/mongodb-memory-server-core/src/util/__tests__/MongoBinaryDownloadUrl.test.ts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe('MongoBinaryDownloadUrl', () => {
189189
expect(spy.mock.calls).toMatchSnapshot();
190190
});
191191

192-
it('for ubuntu 14.04 for 3.6', async () => {
192+
it('ubuntu 14.04 (x86_64) & 3.6.3', async () => {
193193
const du = new MongoBinaryDownloadUrl({
194194
platform: 'linux',
195195
arch: 'x64',
@@ -205,7 +205,7 @@ describe('MongoBinaryDownloadUrl', () => {
205205
);
206206
});
207207

208-
it('for ubuntu 20.04 for 4.0', async () => {
208+
it('ubuntu 20.04 (x86_64) & 4.0.0', async () => {
209209
const du = new MongoBinaryDownloadUrl({
210210
platform: 'linux',
211211
arch: 'x64',
@@ -221,7 +221,7 @@ describe('MongoBinaryDownloadUrl', () => {
221221
);
222222
});
223223

224-
it('for ubuntu 22.04 for 4.0 (using 1804)', async () => {
224+
it('ubuntu 22.04 (x86_64) & 4.0.0 (using ubuntu1804)', async () => {
225225
const du = new MongoBinaryDownloadUrl({
226226
platform: 'linux',
227227
arch: 'x64',
@@ -237,7 +237,7 @@ describe('MongoBinaryDownloadUrl', () => {
237237
);
238238
});
239239

240-
it('for ubuntu 22.04 for 4.4 (using 2004)', async () => {
240+
it('ubuntu 22.04 (x86_64) & 4.4.0 (using ubuntu2004)', async () => {
241241
const du = new MongoBinaryDownloadUrl({
242242
platform: 'linux',
243243
arch: 'x64',
@@ -253,7 +253,7 @@ describe('MongoBinaryDownloadUrl', () => {
253253
);
254254
});
255255

256-
it('for ubuntu 20.04 for 5.0', async () => {
256+
it('ubuntu 20.04 (x86_64) & 5.0.8', async () => {
257257
const du = new MongoBinaryDownloadUrl({
258258
platform: 'linux',
259259
arch: 'x64',
@@ -269,7 +269,7 @@ describe('MongoBinaryDownloadUrl', () => {
269269
);
270270
});
271271

272-
it('for ubuntu 22.04 for 5.0 (using 2004)', async () => {
272+
it('ubuntu 22.04 (x86_64) & 5.0.8 (using ubuntu2004)', async () => {
273273
const du = new MongoBinaryDownloadUrl({
274274
platform: 'linux',
275275
arch: 'x64',
@@ -285,7 +285,7 @@ describe('MongoBinaryDownloadUrl', () => {
285285
);
286286
});
287287

288-
it('for ubuntu 20.04 for 6.0', async () => {
288+
it('ubuntu 20.04 (x86_64) & 6.0.0', async () => {
289289
const du = new MongoBinaryDownloadUrl({
290290
platform: 'linux',
291291
arch: 'x64',
@@ -301,7 +301,7 @@ describe('MongoBinaryDownloadUrl', () => {
301301
);
302302
});
303303

304-
it('for ubuntu 22.04 for 6.0 (using 2004)', async () => {
304+
it('ubuntu 22.04 (x86_64) & 6.0.0 (using ubuntu2004)', async () => {
305305
const du = new MongoBinaryDownloadUrl({
306306
platform: 'linux',
307307
arch: 'x64',
@@ -317,7 +317,7 @@ describe('MongoBinaryDownloadUrl', () => {
317317
);
318318
});
319319

320-
it('for ubuntu 22.04 for 6.0.4', async () => {
320+
it('ubuntu 22.04 (x86_64) & 6.0.4', async () => {
321321
const du = new MongoBinaryDownloadUrl({
322322
platform: 'linux',
323323
arch: 'x64',
@@ -333,7 +333,7 @@ describe('MongoBinaryDownloadUrl', () => {
333333
);
334334
});
335335

336-
it('for ubuntu 22.04 for 7.0.14', async () => {
336+
it('ubuntu 22.04 (x86_64) & 7.0.14', async () => {
337337
const du = new MongoBinaryDownloadUrl({
338338
platform: 'linux',
339339
arch: 'x64',
@@ -349,7 +349,7 @@ describe('MongoBinaryDownloadUrl', () => {
349349
);
350350
});
351351

352-
it('for ubuntu 24.04 for 7.0.14', async () => {
352+
it('ubuntu 24.04 (x86_64) & 7.0.14 (using ubuntu2204)', async () => {
353353
const du = new MongoBinaryDownloadUrl({
354354
platform: 'linux',
355355
arch: 'x64',
@@ -365,7 +365,7 @@ describe('MongoBinaryDownloadUrl', () => {
365365
);
366366
});
367367

368-
it('for ubuntu 22.04 for 8.0.1', async () => {
368+
it('ubuntu 22.04 (x86_64) & 8.0.1', async () => {
369369
const du = new MongoBinaryDownloadUrl({
370370
platform: 'linux',
371371
arch: 'x64',
@@ -381,7 +381,7 @@ describe('MongoBinaryDownloadUrl', () => {
381381
);
382382
});
383383

384-
it('for ubuntu 24.04 for 8.0.1', async () => {
384+
it('ubuntu 24.04 (x86_64) & 8.0.1', async () => {
385385
const du = new MongoBinaryDownloadUrl({
386386
platform: 'linux',
387387
arch: 'x64',
@@ -397,7 +397,7 @@ describe('MongoBinaryDownloadUrl', () => {
397397
);
398398
});
399399

400-
it('should allow v5.0-latest', async () => {
400+
it('ubuntu 20.04 (x86_64) & v5.0-latest', async () => {
401401
const du = new MongoBinaryDownloadUrl({
402402
platform: 'linux',
403403
arch: 'x64',
@@ -413,6 +413,23 @@ describe('MongoBinaryDownloadUrl', () => {
413413
);
414414
});
415415

416+
it('should clamp to highest supported ubuntu year', async () => {
417+
// TODO: try to keep this up-to-date to the latest mongodb supported ubuntu version
418+
const du = new MongoBinaryDownloadUrl({
419+
platform: 'linux',
420+
arch: 'x64',
421+
version: '8.0.1', // highest released mongodb version
422+
os: {
423+
os: 'linux',
424+
dist: 'ubuntu',
425+
release: '24.04', // highest released ubuntu version
426+
},
427+
});
428+
expect(await du.getDownloadUrl()).toBe(
429+
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2404-8.0.1.tgz'
430+
);
431+
});
432+
416433
it('should throw a Error when the provided version could not be coerced [UnknownVersionError]', async () => {
417434
const du = new MongoBinaryDownloadUrl({
418435
platform: 'linux',
@@ -435,25 +452,8 @@ describe('MongoBinaryDownloadUrl', () => {
435452
}
436453
});
437454

438-
it('should clamp to highest supported ubuntu year', async () => {
439-
// TODO: try to keep this up-to-date to the latest mongodb supported ubuntu version
440-
const du = new MongoBinaryDownloadUrl({
441-
platform: 'linux',
442-
arch: 'x64',
443-
version: '8.0.1', // highest released mongodb version
444-
os: {
445-
os: 'linux',
446-
dist: 'ubuntu',
447-
release: '24.04', // highest released ubuntu version
448-
},
449-
});
450-
expect(await du.getDownloadUrl()).toBe(
451-
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2404-8.0.1.tgz'
452-
);
453-
});
454-
455455
describe('arm64', () => {
456-
it('for ubuntu arm64 4.0.25 (below 4.1.10)', async () => {
456+
it('ubuntu 20.04 (arm64) & 4.0.25 (below 4.1.10)', async () => {
457457
const du = new MongoBinaryDownloadUrl({
458458
platform: 'linux',
459459
arch: 'arm64',
@@ -469,7 +469,7 @@ describe('MongoBinaryDownloadUrl', () => {
469469
);
470470
});
471471

472-
it('for ubuntu arm64 4.2.14 (above 4.1.10, below 4.4.0)', async () => {
472+
it('ubuntu 20.04 (arm64) & 4.2.14 (above 4.1.10, below 4.4.0)', async () => {
473473
const du = new MongoBinaryDownloadUrl({
474474
platform: 'linux',
475475
arch: 'arm64',
@@ -485,7 +485,7 @@ describe('MongoBinaryDownloadUrl', () => {
485485
);
486486
});
487487

488-
it('for ubuntu arm64 4.4.6 & ubuntu1804 (above 4.1.10, above 4.4.0)', async () => {
488+
it('ubuntu 18.04 (arm64) & 4.4.6 (above 4.4.0)', async () => {
489489
const du = new MongoBinaryDownloadUrl({
490490
platform: 'linux',
491491
arch: 'arm64',
@@ -501,7 +501,7 @@ describe('MongoBinaryDownloadUrl', () => {
501501
);
502502
});
503503

504-
it('for ubuntu arm64 4.4.6 & ubuntu2004 (above 4.1.10, above 4.4.0)', async () => {
504+
it('ubuntu 20.04 (arm64) & 4.4.6 (above 4.4.0)', async () => {
505505
const du = new MongoBinaryDownloadUrl({
506506
platform: 'linux',
507507
arch: 'arm64',
@@ -517,7 +517,7 @@ describe('MongoBinaryDownloadUrl', () => {
517517
);
518518
});
519519

520-
it('for ubuntu arm64 5.0.0 & ubuntu2004 (above 4.4.0)', async () => {
520+
it('ubuntu 20.04 (arm64) & 5.0.0', async () => {
521521
const du = new MongoBinaryDownloadUrl({
522522
platform: 'linux',
523523
arch: 'arm64',
@@ -533,7 +533,7 @@ describe('MongoBinaryDownloadUrl', () => {
533533
);
534534
});
535535

536-
it('for ubuntu arm64 5.0.0 & ubuntu2204 (above 4.4.0)', async () => {
536+
it('ubuntu 22.04 (arm64) & 5.0.0', async () => {
537537
const du = new MongoBinaryDownloadUrl({
538538
platform: 'linux',
539539
arch: 'arm64',
@@ -1163,7 +1163,7 @@ describe('MongoBinaryDownloadUrl', () => {
11631163
it('linuxmint 21 (x86_64) & 7.0.14 (using ubuntu2204)', async () => {
11641164
(downloadUrl.os as LinuxOS).release = '22';
11651165
downloadUrl.version = '7.0.14';
1166-
// NOTE: there are currently no binaries for ubuntu 24.04, but 22.04 still work
1166+
// NOTE: there are currently no binaries ubuntu 24.04, but 22.04 still work
11671167
expect(await downloadUrl.getDownloadUrl()).toBe(
11681168
'https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-7.0.14.tgz'
11691169
);

0 commit comments

Comments
 (0)