From be0620c1e1dc5389d565598b4098514ad2b8a0fe Mon Sep 17 00:00:00 2001 From: Miguel Langarano Date: Mon, 11 Sep 2023 23:21:52 -0500 Subject: [PATCH] fixing .env variables --- e2e/cypress-12-demo/scripts/files.ts | 12 ++++++------ e2e/cypress-12-demo/scripts/test.ts | 12 ++++++------ e2e/cypress-13-demo/scripts/files.ts | 12 ++++++------ e2e/cypress-13-demo/scripts/test.ts | 12 ++++++------ turbo.json | 1 + 5 files changed, 25 insertions(+), 24 deletions(-) diff --git a/e2e/cypress-12-demo/scripts/files.ts b/e2e/cypress-12-demo/scripts/files.ts index 2b863dc..7d9bff1 100644 --- a/e2e/cypress-12-demo/scripts/files.ts +++ b/e2e/cypress-12-demo/scripts/files.ts @@ -2,12 +2,12 @@ import { run } from "cypress-cloud"; import fs from "fs"; (async function runTests() { - const projectId = process.env.CURRENTS_PROJECT_ID || "2cI1I5"; - const recordKey = process.env.CURRENTS_RECORD_KEY || "YakSabgBLb7D40nZ"; - const apiKey = - process.env.CURRENTS_API_KEY || - "YpYIAerb1rWuOFrvf7ciK8Za8koKgrtRfoDPboQUOjScnBv91m4qAXSDb8Rb57m9"; - const apiUrl = "https://api.currents.dev/v1/runs/"; + const projectId = process.env.CURRENTS_PROJECT_ID || "projectId"; + const recordKey = process.env.CURRENTS_RECORD_KEY || "recordKey"; + const apiKey = process.env.CURRENTS_API_KEY || "apiKey"; + const apiUrl = + process.env.CURRENTS_RUN_BASE_URL || + "https://api.currents.dev/v1/runs/"; const ciBuildId = `run-api-smoke-${new Date().toISOString()}`; const result: any = await run({ diff --git a/e2e/cypress-12-demo/scripts/test.ts b/e2e/cypress-12-demo/scripts/test.ts index 414dae1..8605f3e 100644 --- a/e2e/cypress-12-demo/scripts/test.ts +++ b/e2e/cypress-12-demo/scripts/test.ts @@ -372,8 +372,8 @@ function testEachResults(results: ComparisonResult[]) { } async function runTests() { - const projectId = process.env.CURRENTS_PROJECT_ID || "2cI1I5"; - const recordKey = process.env.CURRENTS_RECORD_KEY || "YakSabgBLb7D40nZ"; + const projectId = process.env.CURRENTS_PROJECT_ID || "projectId"; + const recordKey = process.env.CURRENTS_RECORD_KEY || "recordKey"; const ciBuildId = `run-api-smoke-${new Date().toISOString()}`; const result: any = await run({ @@ -387,10 +387,10 @@ async function runTests() { } async function getApiData(runUrl: string) { - const apiKey = - process.env.CURRENTS_API_KEY || - "YpYIAerb1rWuOFrvf7ciK8Za8koKgrtRfoDPboQUOjScnBv91m4qAXSDb8Rb57m9"; - const apiUrl = "https://api.currents.dev/v1/runs/"; + const apiKey = process.env.CURRENTS_API_KEY || "apiKey"; + const apiUrl = + process.env.CURRENTS_RUN_BASE_URL || + "https://api.currents.dev/v1/runs/"; const headers = new Headers({ Authorization: `Bearer ${apiKey}`, diff --git a/e2e/cypress-13-demo/scripts/files.ts b/e2e/cypress-13-demo/scripts/files.ts index cd4e828..729b3d7 100644 --- a/e2e/cypress-13-demo/scripts/files.ts +++ b/e2e/cypress-13-demo/scripts/files.ts @@ -2,12 +2,12 @@ import { run } from "cypress-cloud"; import fs from "fs"; (async function runTests() { - const projectId = process.env.CURRENTS_PROJECT_ID || "2cI1I5"; - const recordKey = process.env.CURRENTS_RECORD_KEY || "YakSabgBLb7D40nZ"; - const apiKey = - process.env.CURRENTS_API_KEY || - "YpYIAerb1rWuOFrvf7ciK8Za8koKgrtRfoDPboQUOjScnBv91m4qAXSDb8Rb57m9"; - const apiUrl = "https://api.currents.dev/v1/runs/"; + const projectId = process.env.CURRENTS_PROJECT_ID || "projectId"; + const recordKey = process.env.CURRENTS_RECORD_KEY || "recordKey"; + const apiKey = process.env.CURRENTS_API_KEY || "apiKey"; + const apiUrl = + process.env.CURRENTS_RUN_BASE_URL || + "https://api.currents.dev/v1/runs/"; const ciBuildId = `run-api-smoke-${new Date().toISOString()}`; const result: any = await run({ diff --git a/e2e/cypress-13-demo/scripts/test.ts b/e2e/cypress-13-demo/scripts/test.ts index 42d5716..d67ba5f 100644 --- a/e2e/cypress-13-demo/scripts/test.ts +++ b/e2e/cypress-13-demo/scripts/test.ts @@ -428,8 +428,8 @@ function testEachResults(results: ComparisonResult[]): string[] { } async function runTests() { - const projectId = process.env.CURRENTS_PROJECT_ID || "2cI1I5"; - const recordKey = process.env.CURRENTS_RECORD_KEY || "YakSabgBLb7D40nZ"; + const projectId = process.env.CURRENTS_PROJECT_ID || "projectId"; + const recordKey = process.env.CURRENTS_RECORD_KEY || "recordKey"; const ciBuildId = `run-api-smoke-${new Date().toISOString()}`; const result: any = await run({ @@ -443,10 +443,10 @@ async function runTests() { } async function getApiData(runUrl: string) { - const apiKey = - process.env.CURRENTS_API_KEY || - "YpYIAerb1rWuOFrvf7ciK8Za8koKgrtRfoDPboQUOjScnBv91m4qAXSDb8Rb57m9"; - const apiUrl = "https://api.currents.dev/v1/runs/"; + const apiKey = process.env.CURRENTS_API_KEY || "apiKey"; + const apiUrl = + process.env.CURRENTS_RUN_BASE_URL || + "https://api.currents.dev/v1/runs/"; const headers = new Headers({ Authorization: `Bearer ${apiKey}`, diff --git a/turbo.json b/turbo.json index b506b67..d3aa808 100644 --- a/turbo.json +++ b/turbo.json @@ -22,6 +22,7 @@ "CURRENTS_API_URL", "CURRENTS_RECORD_KEY", "CURRENTS_API_KEY", + "CURRENTS_RUN_BASE_URL", "TF_BUILD", "TF_BUILD_BUILDNUMBER", "AZURE_HTTP_USER_AGENT",