-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Task #21 #43
base: develop
Are you sure you want to change the base?
Task #21 #43
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/code4ro/next-door/pbg2b3zwm |
In the future, we might consider using a dedicated profile for the integrations tests that need to boot the database, if they take too long. For now, they are quite fast (1-2s). I did not use @DirtiesContext for the time being, as it does not seem to be necessary with the clear separation between controller unit tests (no DB, only mocking of services) and controller integration tests (using the test H2 in mem data source and the cleanup DB test listener). The cleanup listener is much faster than reinitializing the app context for each text. |
What does it fix?
Closes #21
Adds the unit test framework for services (with JUnit 5, Mockito and AspectJ) and for controllers (with MockMvc and mocked services).
Adds the integration test framework for controllers (with full database support and cleanup).
Implemented unit and integration tests for authentication & registration services and controllers.
Fixed issues with Flyway configuration for dev and disabled Flyway in test profile (which uses H2 not MySQL).
How has it been tested?
All tests run successfully.