fix: update e2e script to include e2e env source

This commit is contained in:
ramvignesh-b
2026-04-20 20:59:09 +05:30
parent 7bab2937bc
commit bd0f2e0171
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# Load dotenv files # Load dotenv files
env = environ.Env() env = environ.Env()
env_file = os.path.join(BASE_DIR.parent, ".env") env_file = os.environ.get("PIKU_ENV_FILE", os.path.join(BASE_DIR.parent, ".env"))
if os.path.exists(env_file): if os.path.exists(env_file):
environ.Env.read_env(env_file, overwrite=False) environ.Env.read_env(env_file, overwrite=False)
+2
View File
@@ -35,6 +35,7 @@ cleanup() {
trap cleanup EXIT trap cleanup EXIT
echo "Starting Database and Mail server..." echo "Starting Database and Mail server..."
COMPOSE_BIN="$(command -v docker-compose || true)" COMPOSE_BIN="$(command -v docker-compose || true)"
if echo "$CONTAINER_BIN" | grep -q "podman"; then if echo "$CONTAINER_BIN" | grep -q "podman"; then
@@ -51,6 +52,7 @@ until $CONTAINER_BIN exec "$DB_NAME" pg_isready -U "${DB_USER:-test}" >/dev/null
sleep 2 sleep 2
done done
export PIKU_ENV_FILE="$ENV_FILE"
echo "Starting Backend..." echo "Starting Backend..."
mkdir -p ./tmp/logs mkdir -p ./tmp/logs
(cd backend && uv run manage.py migrate) (cd backend && uv run manage.py migrate)