Add integration test to build a docker file
We need an integration test (not triggered through tox by default), that builds a docker image through the WorkerVersion code. Api calls to Arkindex are mocked, but docker calls are real.
It should run in a dedicated task on CI, using a docker service (like our CI docker builds).
- add a file in
integration/test_worker_version.py
- add a method
test_docker_build()
that runs when the module is executde with Python - in that method, configure a
BuildWorkerVersion
instance to be able to execute thebuild_image
andsave_image
on a dummyDockerfile
- once it works locally, add a new task named
integration-tests
(test stage) in the Gitlab CI, with a docker service dependency (look at.build-job
...) that simply calls the script.
Edited by Bastien Abadie