hobbit-project / platform

HOBBIT benchmarking platform
GNU General Public License v2.0
23 stars 9 forks source link

Gitlab controller tests are relying on git.project-hobbit.eu #382

Open MichaelRoeder opened 5 years ago

MichaelRoeder commented 5 years ago

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.

denkv commented 5 years ago

Other currently "online" requirements:

Dependency images from Docker Hub:

Docker images from Docker Hub used it tests:

For the last two, we can actually build something locally instead.

MichaelRoeder commented 5 years ago

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.

denkv commented 5 years ago

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.

denkv commented 4 years ago

Since we actually can somewhat rely on Docker Hub being available, we can also automatically spin up GitLab instance locally before running tests.

denkv commented 3 years ago

Alternative: a simple GitLab mock just for tests, with a test on an online instance being automatically skipped if it's not available.