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

Application works as expected, but unit tests fail in with 404 NotFoundError #9819

Open
ewrayjohnson opened this issue Aug 7, 2023 · 0 comments
Labels

Comments

@ewrayjohnson
Copy link

Describe the bug

I created a simple application with lb4 cli, and it works fine when I run it. However, when I run a unit test, all controller, and repository tests fail. During the test, my application starts and the application init and start events both fire, and I successfully create a client using createRestAppClient. The home page works and so does the explorer page. However, the /ping route generates a 404 NotFoundError and the app.getRepository(MyRepository fails with MyRepositiry "is not bound to any value in context". What am I missing?

Logs

ResolutionError: The key 'repositories.MyRepository' is not bound to any value in context MyApplication-roGIIRWyRTi6GQlKUsHn_Q-0 (context: MyApplication-roGIIRWyRTi6GQlKUsHn_Q-0, binding: repositories.MyRepository)

Additional information

No response

Reproduction

Upcoming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant