Skip to content

Commit 4f5d68a

Browse files
committed
[WIP] RHOAIENG-9707 ci: dynamic testing of container images with pytest
Things to check or do * [ ] how this works with podman * [ ] how to test both kubernetes and docker with the same tests * [ ] how to run the notebook server and check that that works * [ ] generate test_* methods for every target in Makefile * [ ] commandline parameter to specify image to test * [ ] without parameter with image to test it can build the image as part of test For now it uses images from https://github.com/jiridanek/notebooks/actions/runs/10006075164/job/27658080202 and not from the current build.
1 parent 82cb2bf commit 4f5d68a

File tree

6 files changed

+1481
-1
lines changed

6 files changed

+1481
-1
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ poetry install --sync
6464
poetry run pytest
6565
```
6666

67+
##### Container selftests
68+
69+
We're using [Dagger.io](https://dagger.io) to run containers from Python tests.
70+
It has very nice verbose logging by default for every action that is running.
71+
72+
**TODO** need to decide which is more suitable;
73+
ideally the tests should allow switching between Kubernetes and Docker/Podman.
74+
That means tying it to this fancy Dagger thing may not be the smartest thing to do.
75+
76+
We also considered [Testcontainers.com](https://testcontainers.com/).
77+
The main difference between the two is that Dagger creates more abstractions over the container engine.
78+
Especially Dagger [does not allow bind-mounting local directories](https://docs.dagger.io/cookbook/#modify-a-copied-directory-or-remote-repository-in-a-container)
79+
directly to the container but always copies files in and out.
80+
6781
#### Notebooks
6882

6983
Deploy the notebook images in your Kubernetes environment using:

0 commit comments

Comments
 (0)