Open jorritb opened 4 years ago
As discussed earlier, we will limit testing to the critical points of failure. A full suite is currently not worth it since a rewrite of the project is desired, it which case testing would be work for nothing.
For integration tests use mocks where possible, if TransactionTestCase helps we can use it. If we are writing end-to-end tests we can spin up elastic in Semaphore and test if the data is actually added and accurate.
Since we have committed to adding more unit and integration tests, we should think about how to handle test cases that involve external systems like Elastic and Postgres. To be able to test code that touches these systems, a test case needs to:
In Django this is done with a TransactionTestCase, perhaps we can take inspiration from there. But there may also be other frameworks out there.