Skip to content

Commit 96e00b5

Browse files
author
Guy Bedford
committed
fixup
1 parent 9995551 commit 96e00b5

File tree

1 file changed

+8
-27
lines changed
  • integration-tests/js-compute

1 file changed

+8
-27
lines changed

integration-tests/js-compute/test.js

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ for (const chunk of chunks(Object.entries(tests), 100)) {
220220
title,
221221
test,
222222
skipped: true,
223+
skipReason: null, // dont mention filtered tests
223224
};
224225
}
225226
// feature based test filtering
@@ -235,6 +236,7 @@ for (const chunk of chunks(Object.entries(tests), 100)) {
235236
title,
236237
test,
237238
skipped: true,
239+
skipReason: `feature "http-cache" ${httpCache ? '' : 'not '}"enabled`,
238240
};
239241
}
240242
async function getBodyChunks(response) {
@@ -311,13 +313,14 @@ for (const chunk of chunks(Object.entries(tests), 100)) {
311313
title,
312314
test,
313315
skipped: true,
316+
skipReason: 'no environments',
314317
};
315318
}
316319
} else {
317320
if (test.environments.includes('compute')) {
318321
return retry(
319-
test.flake ? 10 : bail ? 1 : 4,
320-
expBackoff(test.flake ? '60s' : '30s', test.flake ? '10s' : '1s'),
322+
test.flake ? 15 : bail ? 1 : 4,
323+
expBackoff(test.flake ? '60s' : '30s', test.flake ? '30s' : '1s'),
321324
async () => {
322325
let path = test.downstream_request.pathname;
323326
let url = `${domain}${path}`;
@@ -349,6 +352,7 @@ for (const chunk of chunks(Object.entries(tests), 100)) {
349352
title,
350353
test,
351354
skipped: true,
355+
skipReason: 'no environments',
352356
};
353357
}
354358
}
@@ -373,36 +377,13 @@ for (const result of results) {
373377
if (result.status === 'fulfilled') {
374378
passed += 1;
375379
if (result.value.skipped) {
376-
if (
377-
filter.length > 0 &&
378-
filter.every((f) => !result.value.title.includes(f))
379-
) {
380-
// console.log(white, info, `Skipped by test filter: ${result.value.title}`, reset);
381-
} else if (local && !result.value.test.environments.includes('viceroy')) {
380+
if (result.value.skipReason)
382381
console.log(
383382
white,
384383
info,
385-
`Skipped as test marked to only run on Fastly Compute: ${result.value.title}`,
384+
`Skipped ${result.value.title} due to ${result.value.skipReason}`,
386385
reset,
387386
);
388-
} else if (
389-
!local &&
390-
!result.value.test.environments.includes('compute')
391-
) {
392-
console.log(
393-
white,
394-
info,
395-
`Skipped as test marked to only run on local server: ${result.value.title}`,
396-
reset,
397-
);
398-
} else {
399-
console.log(
400-
white,
401-
info,
402-
`Skipped due to no environments set: ${result.value.title}`,
403-
reset,
404-
);
405-
}
406387
} else {
407388
console.log(green, tick, result.value.title, reset);
408389
}

0 commit comments

Comments
 (0)