Heya!
I have a container in which I need to run a script (which itself starts up a database) and then run some tests with cargo, some which use said database.
Because of some factors outside of my control I can't do something like instantiating that database as a service that gets passed into that container. I need to do it as described above.
I noticed that calling the two commands successively:
c.with_exec(['./entrypoint.sh'])
.with_exec(['bash', '-c', 'cargo test'])
.stdout()
Doesn't work as expected. The first command executes successfully, but the database is not up when running the tests. My guess is the database gets shut down between the calls.
Is there an easy way to ensure these two commands get executed consecutively without stopping the container in between?