https://pantsbuild.org/ logo
#general
Title
# general
l

little-zoo-57121

07/10/2022, 5:20 AM
hello again friends 👋 I have some tests I wish to run against a database and I would like to use a docker container when those tests are run to serve it. Now I can pretty simply do this by just running it first and then running
./pants test
on the desired target(s), but I'm really digging using
pants
as my do-all tool. My question is: do I have a way within
pants
to do both of these things together? More specifically, is there a way for pants to run the image as defined as a
docker_image
target in a
BUILD
and then run the tests that aim to use it? (edit: via a single invocation, where pants knows these tests need this container to run) I have tried some various exploration using dependencies, and looked through the docs to see if something similar was outlined there but have come up empty handed. Or is this just not something that I can currently do?