From 738005cd1824754c4ecabdda6c692e70e0a3821a Mon Sep 17 00:00:00 2001 From: monsieurswag Date: Wed, 4 Dec 2024 14:56:08 +0100 Subject: [PATCH] Remove useless environment variable --- .github/workflows/functional-tests.yml | 2 -- .github/workflows/startup-tests.yml | 2 -- frontend/src/lib/utils/env_constants.ts | 5 ----- frontend/src/routes/(authentication)/login/+page.server.ts | 2 -- 4 files changed, 11 deletions(-) delete mode 100644 frontend/src/lib/utils/env_constants.ts diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 9a81d02577..54104981bd 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -70,7 +70,6 @@ jobs: run: | touch .env echo PUBLIC_BACKEND_API_URL=http://localhost:8000/api >> .env - echo CI_TEST=1 >> .env - name: Create backend environment variables file working-directory: ${{ env.backend-directory }} run: | @@ -175,7 +174,6 @@ jobs: run: | touch .env echo PUBLIC_BACKEND_API_URL=http://localhost:8000/api >> .env - echo CI_TEST=1 >> .env - name: Create backend environment variables file working-directory: ${{ env.backend-directory }} run: | diff --git a/.github/workflows/startup-tests.yml b/.github/workflows/startup-tests.yml index ec47e56de4..ac3a48c243 100644 --- a/.github/workflows/startup-tests.yml +++ b/.github/workflows/startup-tests.yml @@ -63,7 +63,6 @@ jobs: run: | touch .env echo PUBLIC_BACKEND_API_URL=http://localhost:8000/api >> .env - echo CI_TEST=1 >> .env - name: Create backend environment variables file working-directory: ${{ env.backend-directory }} run: | @@ -199,7 +198,6 @@ jobs: run: | touch .env echo PUBLIC_BACKEND_API_URL=http://localhost:8000/api >> .env - echo CI_TEST=1 >> .env - name: Create backend environment variables file working-directory: ${{ env.backend-directory }} run: | diff --git a/frontend/src/lib/utils/env_constants.ts b/frontend/src/lib/utils/env_constants.ts deleted file mode 100644 index d9dd784ab5..0000000000 --- a/frontend/src/lib/utils/env_constants.ts +++ /dev/null @@ -1,5 +0,0 @@ -import * as env from '$env/static/private'; - -// This file is separate from constant.ts because '$env/static/private' can only be imported on the server-side. - -export const CI_TEST: boolean = Object.hasOwn(env, 'CI_TEST'); diff --git a/frontend/src/routes/(authentication)/login/+page.server.ts b/frontend/src/routes/(authentication)/login/+page.server.ts index 0f0611bfb9..7b118aa891 100644 --- a/frontend/src/routes/(authentication)/login/+page.server.ts +++ b/frontend/src/routes/(authentication)/login/+page.server.ts @@ -1,8 +1,6 @@ import { getSecureRedirect } from '$lib/utils/helpers'; import { ALLAUTH_API_URL, BASE_API_URL } from '$lib/utils/constants'; -// The CI_TEST environment variable will have to be removed if the `currentLang == preferedLang` solution fix the enterprise function tests. -// import { CI_TEST } from '$lib/utils/env_constants'; import { loginSchema } from '$lib/utils/schemas'; import type { LoginRequestBody } from '$lib/utils/types'; import { fail, redirect, type Actions } from '@sveltejs/kit';