[tests] Revert "update CI to use node@14 and drop support for node@12 (#7819)" (#7853)

Revert "[tests] update CI to use node@14 and drop support for node@12 (#7819)"

This reverts commit 89b5aad367.
This commit is contained in:
Nathan Rajlich
2022-05-21 20:11:08 -07:00
committed by GitHub
parent 7f0caa7dec
commit 5a7851a7f7
22 changed files with 37 additions and 46 deletions

View File

@@ -72,15 +72,7 @@ async function nowDeploy(bodies, randomness, uploadNowJson) {
if (json.error && json.error.code === 'missing_files')
throw new Error('Missing files');
deploymentId = json.id;
deploymentUrl = json.url || '';
if (!deploymentUrl.startsWith('https')) {
// if it doesn't look like an absolute URL, fetch will not work
console.log(
`Warning: deployment (${deploymentId}) returned deployment url of "${deploymentUrl}", which is not absolute. Prepending "https://".`
);
deploymentUrl = 'https://' + deploymentUrl;
}
deploymentUrl = json.url;
}
logWithinTest('id', deploymentId);
@@ -96,9 +88,7 @@ async function nowDeploy(bodies, randomness, uploadNowJson) {
const { readyState } = deployment;
if (readyState === 'ERROR') {
logWithinTest('state is ERROR, throwing');
const error = new Error(
`State of https://${deploymentUrl} is ERROR: ${deployment.errorMessage}`
);
const error = new Error(`State of https://${deploymentUrl} is ERROR`);
error.deployment = deployment;
throw error;
}