linkml / linkml-solr

Simple wrapper for using Solr with LinkML schemas
4 stars 0 forks source link

Dockerize or use mocking in tests #3

Open cmungall opened 2 years ago

cmungall commented 2 years ago

Currently tests fail in actions, they depend on solr in docker, figure out how best to orchestrate w GH actions

sierra-moxon commented 1 year ago

@kevinschaper - do you have any additional insights here? Are you using linkml-solr and solr in a containerized implementation?

kevinschaper commented 1 year ago

I haven't looked at how it fails, but the extra context is that the lsolr command will start up Solr in docker for you, but in a GitHub action I'm fairly sure you can't just execute a docker run

I think running the Solr container explicitly as a part of the action might work, and setup the tests around an assumption that Solr is already there

Testing the lsolr start command itself should probably just use mocking to make sure it's calling the right sh command

gaurav commented 1 year ago

Translator SRI uses a containerized Solr instance to run Name Lookup: we prepare a Solr backup containing all the synonym information, and then the container downloads and restores that backup when initializing. I don't know if a similar strategy would work for you, but feel free to steal some ideas from there or to ask Yaphet or me any questions you have!