Gitlab controller tests are relying on git.project-hobbit.eu
Description
The JUnit tests for the GitlabControllerImpl class are relying on our online instance. However, unit tests should not rely on external services and the platform can not be build if the service is not available.
Other currently "online" requirements:
Dependency images from Docker Hub:
- google/cadvisor
- rabbitmq
- redis
- prom/node-exporter
- prom/prometheus
Docker images from Docker Hub used it tests:
- busybox
- helloworld
For the last two, we can actually build something locally instead.
The first 5 requirements are fine as long as they are not used in the tests.
Building something locally has the disadvantage, that we would still need a "base image" unless you want to create an image from scratch (not sure how this is done...). The busybox is something very common used for Docker testing. However, we may want to remove the helloworld since the busybox should be sufficient as a dummy container.
Looked into the case of hello-world image: it's used in the test which tests that missing image (we remove it first) can be pulled by the platform.
Since we actually can somewhat rely on Docker Hub being available, we can also automatically spin up GitLab instance locally before running tests.
Alternative: a simple GitLab mock just for tests, with a test on an online instance being automatically skipped if it's not available.