mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
[tests] update python tests to use zero config (#9668)
This PR is some cleanup before splitting python e2e tests. Changes: - use `probes.json` - use `/api` autodetection instead of `builds` array --- I was also trying to figure out why these tests are so much faster when run locally (293s) vs. CI (1099s). I encountered issues trying to view the build logs for the deployments that are made.
This commit is contained in:
@@ -116,7 +116,7 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
|
||||
deploymentId,
|
||||
deploymentUrl,
|
||||
deploymentLogs,
|
||||
logLength: deploymentLogs.length,
|
||||
logLength: deploymentLogs?.length,
|
||||
});
|
||||
throw new Error(
|
||||
`Expected deployment logs of ${deploymentId} to contain ${toCheck}, it was not found`
|
||||
@@ -242,11 +242,20 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!actualArr?.length) {
|
||||
throw new Error(
|
||||
`Page ${probeUrl} does NOT contain response header "${header}", but probe says it should .\n\nActual: ${formatHeaders(
|
||||
rawHeaders
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
if (!Array.isArray(expectedArr)) {
|
||||
expectedArr = [expectedArr];
|
||||
}
|
||||
for (const expected of expectedArr) {
|
||||
let isEqual = false;
|
||||
|
||||
for (const actual of actualArr) {
|
||||
isEqual =
|
||||
expected.startsWith('/') && expected.endsWith('/')
|
||||
|
||||
Reference in New Issue
Block a user