[tests] Use new VERCEL_TEST_TOKEN for tests (#8614)

Use `VERCEL_TEST_TOKEN` for tests
This commit is contained in:
Mark Glagola
2022-09-22 15:07:43 -05:00
committed by GitHub
parent 0ecfdc1325
commit 225e0a4de3
3 changed files with 9 additions and 9 deletions

View File

@@ -200,8 +200,8 @@ async function fetchTokenWithRetry(retries = 5) {
NOW_TOKEN,
TEMP_TOKEN,
VERCEL_TOKEN,
VERCEL_TEAM_TOKEN,
VERCEL_REGISTRATION_URL,
VERCEL_TEST_TOKEN,
VERCEL_TEST_REGISTRATION_URL,
} = process.env;
if (VERCEL_TOKEN || NOW_TOKEN || TEMP_TOKEN) {
if (!TEMP_TOKEN) {
@@ -211,7 +211,7 @@ async function fetchTokenWithRetry(retries = 5) {
}
return VERCEL_TOKEN || NOW_TOKEN || TEMP_TOKEN;
}
if (!VERCEL_TEAM_TOKEN || !VERCEL_REGISTRATION_URL) {
if (!VERCEL_TEST_TOKEN || !VERCEL_TEST_REGISTRATION_URL) {
throw new Error(
process.env.CI
? 'Failed to create test deployment. This is expected for 3rd-party Pull Requests. Please run tests locally.'
@@ -219,10 +219,10 @@ async function fetchTokenWithRetry(retries = 5) {
);
}
try {
const res = await _fetch(VERCEL_REGISTRATION_URL, {
const res = await _fetch(VERCEL_TEST_REGISTRATION_URL, {
method: 'POST',
headers: {
Authorization: `Bearer ${VERCEL_TEAM_TOKEN}`,
Authorization: `Bearer ${VERCEL_TEST_TOKEN}`,
},
});
if (!res.ok) {