mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-07 12:57:47 +00:00
[tests] Use new VERCEL_TEST_TOKEN for tests (#8614)
Use `VERCEL_TEST_TOKEN` for tests
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user