Closed neelabalan closed 3 years ago
If you use the drop function you will need to recreate the special index (there are services with special indexes)
I think there are 3 services using create_index out of 9. I think I will figure out a way recreate the index for those 3 since pytest.fixture is limited to only that testing module and I could use the drop for other 6. I'll go back to the previous (delete after every test) approach if you think that won't work.
I think the drop will be find, but we must recreate the index to keep the consistency of the services.
I think the drop will be find, but we must recreate the index to keep the consistency of the services.
so what do you suggest?
Well the indexes are recreated on the services are restarted so it's not big deal. We could re-create the indexes from the tests manually .
a pre commit hook might be great
I've added a drop function in the utils to take care of dropping the collection after every test, This is handled in the pytest fixture. Let me know if changes needed.