Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port number set in env.test is ignored #4794

Open
nadlgit opened this issue Nov 14, 2024 · 1 comment
Open

Port number set in env.test is ignored #4794

nadlgit opened this issue Nov 14, 2024 · 1 comment
Assignees
Labels
Type: Bug The issue has indentified a bug

Comments

@nadlgit
Copy link

nadlgit commented Nov 14, 2024

Package version

6.14.1

Describe the bug

I have same issue as described in this Discord feed: https://discord.com/channels/423256550564691970/1293218007253909504.

When using a separate env file for tests (env.test or env.test.local), the PORT variable is ignored and instead the value for default env file is used. For example, if we set 3333 in .env and 3334 in .env.test, 3333 is still used during test runs.

It seems to me that PORT is the only one ignored and other variables are correctly set.

The workaround proposed in above Discord feed works: setting conditionally process.env.NODE_ENV to 'test' inside bin/console.ts. But I think it's a bit awkward.

Reproduction repo

No response

@thetutlage thetutlage self-assigned this Nov 14, 2024
@thetutlage thetutlage added the Type: Bug The issue has indentified a bug label Nov 14, 2024
@thetutlage
Copy link
Member

Yup, I can reproduce the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue has indentified a bug
Projects
None yet
Development

No branches or pull requests

2 participants