Skip to content

Commit 5886bcd

Browse files
committed
promote: fix tests for check_assets.js
Tests needed to be updated after `docs/apilinks.json` was added to the expected assets for `v10.x`. Refs: #2278
1 parent 71b538e commit 5886bcd

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

ansible/www-standalone/tools/promote/check_assets.js

+16-12
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ function test () {
314314
const version = 'v10.1.0'
315315
const expectedStdout =
316316
'... Checking assets\n' +
317-
'... Expecting a total of 40 assets for v10.x\n' +
318-
'... 37 assets waiting in staging\n' +
317+
'... Expecting a total of 41 assets for v10.x\n' +
318+
'... 38 assets waiting in staging\n' +
319319
'... 0 assets already promoted\n' +
320320
' \u001b[33m\u001b[1m⚠\u001b[22m\u001b[39m The following assets are expected for v10.x but are currently missing from staging:\n' +
321321
' • node-v10.1.0-linux-armv6l.tar.gz\n' +
@@ -376,9 +376,9 @@ function test () {
376376
const version = 'v11.11.11'
377377
const expectedStdout =
378378
'... Checking assets\n' +
379-
'... Expecting a total of 40 assets for v11.x\n' +
380-
'... 40 assets waiting in staging\n' +
381-
' \u001b[33m\u001b[1m⚠\u001b[22m\u001b[39m 40 assets already promoted will be overwritten, is this OK?\n' +
379+
'... Expecting a total of 41 assets for v11.x\n' +
380+
'... 41 assets waiting in staging\n' +
381+
' \u001b[33m\u001b[1m⚠\u001b[22m\u001b[39m 41 assets already promoted will be overwritten, is this OK?\n' +
382382
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v11.x\n' +
383383
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n'
384384

@@ -399,13 +399,17 @@ function test () {
399399
' Should a new list be created for v9.x?\n' +
400400
' https://github.com/nodejs/build/tree/main/ansible/www-standalone/tools/promote/expected_assets/v9.x\n' +
401401
'... Expecting a total of 44 assets for v9.x\n' +
402-
'... 40 assets waiting in staging\n' +
402+
'... 41 assets waiting in staging\n' +
403403
'... 0 assets already promoted\n' +
404404
' \u001b[33m\u001b[1m⚠\u001b[22m\u001b[39m The following assets are expected for v9.x but are currently missing from staging:\n' +
405405
' • node-v9.9.9-linux-x86.tar.gz\n' +
406406
' • node-v9.9.9-linux-x86.tar.xz\n' +
407407
' • node-v9.9.9-sunos-x86.tar.gz\n' +
408408
' • node-v9.9.9-sunos-x86.tar.xz\n' +
409+
' \u001b[31m\u001b[1m✖\u001b[22m\u001b[39m The following assets were found in staging but are not expected for v9.x:\n' +
410+
' • docs/apilinks.json\n' +
411+
' Does the expected assets list for v9.x need to be updated?\n' +
412+
' https://github.com/nodejs/build/tree/main/ansible/www-standalone/tools/promote/expected_assets/v9.x\n' +
409413
' \u001b[33mPromote if you are certain this is the the correct course of action\u001b[39m\n'
410414

411415
async function setup (fixtureStagingDir, fixtureDistDir) {
@@ -422,9 +426,9 @@ function test () {
422426
const version = 'v10.0.0'
423427
const expectedStdout =
424428
'... Checking assets\n' +
425-
'... Expecting a total of 40 assets for v10.x\n' +
429+
'... Expecting a total of 41 assets for v10.x\n' +
426430
'... 2 assets waiting in staging\n' +
427-
'... 38 assets already promoted\n' +
431+
'... 39 assets already promoted\n' +
428432
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v10.x\n'
429433

430434
async function setup (fixtureStagingDir, fixtureDistDir) {
@@ -448,9 +452,9 @@ function test () {
448452
const version = 'v10.0.0'
449453
const expectedStdout =
450454
'... Checking assets\n' +
451-
'... Expecting a total of 40 assets for v10.x\n' +
455+
'... Expecting a total of 41 assets for v10.x\n' +
452456
'... 2 assets waiting in staging\n' +
453-
'... 40 assets already promoted\n' +
457+
'... 41 assets already promoted\n' +
454458
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v10.x\n' +
455459
' \u001b[31m\u001b[1m✖\u001b[22m\u001b[39m The following assets were found in staging but are not expected for v10.x:\n' +
456460
' • ooolaalaa.tar.gz\n' +
@@ -476,8 +480,8 @@ function test () {
476480
const version = 'v11.11.1'
477481
const expectedStdout =
478482
'... Checking assets\n' +
479-
'... Expecting a total of 40 assets for v11.x\n' +
480-
'... 42 assets waiting in staging\n' +
483+
'... Expecting a total of 41 assets for v11.x\n' +
484+
'... 43 assets waiting in staging\n' +
481485
'... 0 assets already promoted\n' +
482486
' \u001b[32m\u001b[1m✓\u001b[22m\u001b[39m Complete set of expected assets in place for v11.x\n' +
483487
' \u001b[31m\u001b[1m✖\u001b[22m\u001b[39m The following assets were found in staging but are not expected for v11.x:\n' +

0 commit comments

Comments
 (0)