Skip to content

Commit a790bbe

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 a1154b4 commit a790bbe

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
@@ -62,6 +62,20 @@ poetry install --sync
6262
poetry run pytest
6363
```
6464

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

6781
Deploy the notebook images in your Kubernetes environment using:

0 commit comments

Comments
 (0)