Replies: 1 comment 1 reply
-
Mounts can be setup the Scheduling fixtures is afaik relatively tricky with pytest. You can make one fixture request another, but that will only ensure that your download fixture runs after the container fixture (which you most certainly do not want). I don't know a good way how to achieve this. Instead, I would recommend to either download the file before you run your tests (assuming that it does not change frequently) or download it during container build: ctr = DerivedContainer(base=url_to_img, containerfile="RUN curl https://url_to_file") If you want a pytest only solution, you could also try to download the file before all tests run: https://stackoverflow.com/a/35394239 (but that's obviously a nogo if the files are different). |
Beta Was this translation helpful? Give feedback.
-
Prior to running the container, a file needs to be downloaded. Hence, I created a fixture for downloading the file but I don't know how make the container run after it and how to setup a mount.
BTW, this is a super cool project and thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions