[tests] Update tests to run with vercel cli tarball (#8257)

This PR update the tests suite to wait for Vercel CLI tarball and then use that tarball to run E2E tests.

This is valuable because it will package all the packages in this monorepo to make the tests follow more closely what will happen in production once merged.

Since the current "Find Changes" step takes about 2 minutes, we run that first (it happens concurrently with the tarball preparation). Then once we complete "Find Changes" we wait for the tarball but it will likely be ready by that point since it also takes about 2 minutes. After both of those steps, the E2E tests continue as usual but with the `VERCEL_CLI_VERSION` set to the tarball.

- Related to #7967 
- Closes #8245 
- Closes #8227
This commit is contained in:
Steven
2022-07-27 17:56:03 -04:00
committed by GitHub
parent 8993a3c4af
commit b5b792e42f
22 changed files with 2392 additions and 338 deletions

View File

@@ -264,11 +264,7 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
assert(hadTest, 'probe must have a test condition');
}
async function testDeployment(
{ builderUrl, buildUtilsUrl },
fixturePath,
buildDelegate
) {
async function testDeployment(fixturePath, buildDelegate) {
logWithinTest('testDeployment', fixturePath);
const globResult = await glob(`${fixturePath}/**`, {
nodir: true,
@@ -321,24 +317,6 @@ async function testDeployment(
});
for (const build of nowJson.builds || []) {
if (builderUrl) {
if (builderUrl === '@canary') {
build.use = `${build.use}@canary`;
} else {
build.use = `https://${builderUrl}`;
}
}
if (buildUtilsUrl) {
build.config = build.config || {};
const { config } = build;
if (buildUtilsUrl === '@canary') {
const buildUtils = config.useBuildUtils || '@vercel/build-utils';
config.useBuildUtils = `${buildUtils}@canary`;
} else {
config.useBuildUtils = `https://${buildUtilsUrl}`;
}
}
if (buildDelegate) {
buildDelegate(build);
}