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

Provide helpful error message when trying to access config in tests without a project file #1874

Closed
matt2e opened this issue Jun 25, 2024 · 0 comments · Fixed by #1977
Closed
Assignees
Labels

Comments

@matt2e
Copy link
Collaborator

matt2e commented Jun 25, 2024

When:

  • a config, secret, or DSN is accessed in a test
  • no value was found
  • no project file was provided when setting up the test context

Current behaviour:

panic: failed to get config "moneymovements.PFI_FRONTEND_ORIGIN": secret value "PFI_FRONTEND_ORIGIN" not found: not found [recovered]

It'd be better if we explained the most likely solution: use ftltest.WithDefaultProjectFile()

@github-actions github-actions bot added the triage Issue needs triaging label Jun 25, 2024
@ftl-robot ftl-robot mentioned this issue Jun 25, 2024
@matt2e matt2e added next Work that will be be picked up next P1 and removed triage Issue needs triaging labels Jul 1, 2024
@gak gak self-assigned this Jul 3, 2024
@github-actions github-actions bot removed the next Work that will be be picked up next label Jul 3, 2024
@gak gak closed this as completed in #1977 Jul 5, 2024
@gak gak closed this as completed in ce2a3ae Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants