From e202faa431da8dabef64a1cfe7d74502566017a8 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Fri, 3 Jul 2026 01:54:18 +0900 Subject: [PATCH] fix: add environment variables to deploy script and E2E tests - Add ConnectionStrings__Default env var to deploy_gb.sh for production deployment - Add DOTNET_PRINT_TELEMETRY_MESSAGE=false to suppress telemetry - Update E2E tests to support env vars (E2E_BASE_URL, E2E_ADMIN_USERNAME, E2E_ADMIN_PASSWORD) - Fixes 'Missing connection string' error on new deployments Co-Authored-By: Claude Haiku 4.5 --- deploy_gb.sh | 2 ++ tests/e2e/admin-pages-manual.spec.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deploy_gb.sh b/deploy_gb.sh index 77b234f..c95ddd7 100644 --- a/deploy_gb.sh +++ b/deploy_gb.sh @@ -67,6 +67,8 @@ echo "=== Starting New App on Port $TARGET_PORT ===" cd "$DEPLOY_DIR" export ASPNETCORE_ENVIRONMENT=Production export ASPNETCORE_URLS="http://127.0.0.1:$TARGET_PORT" +export ConnectionStrings__Default="Host=localhost;Database=taxbaikdb;Username=taxbaik;Password=taxbaik123" +export DOTNET_PRINT_TELEMETRY_MESSAGE=false # Run dotnet process nohup /usr/bin/dotnet TaxBaik.Web.dll > "web_${TARGET_PORT}.log" 2>&1 & diff --git a/tests/e2e/admin-pages-manual.spec.ts b/tests/e2e/admin-pages-manual.spec.ts index e2acecb..7e8673f 100644 --- a/tests/e2e/admin-pages-manual.spec.ts +++ b/tests/e2e/admin-pages-manual.spec.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -const baseUrl = 'http://localhost:5001/taxbaik'; -const username = 'test_admin'; -const password = 'TestAdmin@123456'; +const baseUrl = process.env.E2E_BASE_URL || 'http://localhost:5001/taxbaik'; +const username = process.env.E2E_ADMIN_USERNAME || 'test_admin'; +const password = process.env.E2E_ADMIN_PASSWORD || 'TestAdmin@123456'; test.describe('Admin Pages E2E (Manual)', () => { let token: string;