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
Write integration tests against lineage #4306
Comments
Blocked on #3019. Once we have gotten rid of kanso I'm happy to take a crack at this. |
This should include a test for #4366 (ticket was completed while the tests were still in a broken state) |
Kanso has been removed, so this ticket is ready to be worked on. |
We also need to add a test to ensure #4523 doesn't affect |
@garethbowen I added the test (which required some code changes) here e1833b3, this should hopefully be made redundant by this PR #4557 |
Refactors lineage tests to include integration tests using an in-memory pouchdb instance (added here as memdown-medic) and unit tests #4306
I assume these are unit and integration tests and the issue does not need AT-ing @SCdF ? |
@ngaruko yep sorry I just put it in AT because I wasn't sure what the process was, as long as the tests are passing (ie the build is passing, which it is) then I think it's all good |
Looking at a lot of the current unit tests for lineage, I'm not convinced they test what they say they are testing. In general these tests are very complicated as they require correctly mocking multiple ordered DB calls. For complete correctness they should also validate that the calls are actually the right ones (ie the query provides the right params), which no / few tests do. For this reason it's also really hard to write new tests, because you have to walk the whole codebase and work out what to mock and when.
We need to be able to write integration tests for lineage. This is only complex because lineage relies on the ddocs existing:
This would actually prove the code is working, as well as making sure if we ever change these views the code continues to work against them.
The text was updated successfully, but these errors were encountered: