cachier icon indicating copy to clipboard operation
cachier copied to clipboard

Can we run DB tests also in local env?

Open Borda opened this issue 1 year ago • 3 comments

So far, the major bottleneck for any contributor and eventually maintainers are the DB tests

  • contributor: does not get them rum as they connect to some external DB, and GH does not share credentials to fork PRs
  • maintainer: he needs to pul the PR to a branch and run all tests before it lands on main/dev branch

So my question, and feel free to discuss it in another form (DM) what is so special with this DB, and can we just start one locally within the job and run tests against it?

Seems there are some actions offering running MongoDB locally: https://github.com/marketplace/actions/mongodb-in-github-actions

Borda avatar Feb 02 '24 11:02 Borda

Nothing special about it.

Having pytest set up a local MongoDB and a connection to it as a fixture for the MongoDB test suite is a great idea, and something I wanted to do for a while, but haven't gotten around to.

I fully support a PR converting all such tests to run against a local server!

shaypal5 avatar Feb 02 '24 11:02 shaypal5

just for the record, after this is addressed we can also proceed with #146

Borda avatar Feb 02 '24 13:02 Borda

just for the record, after this is addressed we can also proceed with #146

Agreed.

shaypal5 avatar Feb 02 '24 14:02 shaypal5