Page MenuHomeSoftware Heritage

tests: Add integration tests for the Software Heritage stack
ClosedPublic

Authored by anlambert on Apr 26 2019, 5:33 PM.

Details

Summary

First draft of integration tests for the Software Heritage stack using the
docker-compose environment and a couple of bash scripts.

Their purpose is to:

  • ensure the docker-compose environment is up to date and running
  • check there is no regression in high level Software Heritage features (loading origins, querying web api, vault cooking, ...)

The tests will fail if:

  • any of the swh service dies unexpectedly
  • any of the command in the test scripts exits with error

First written tests are about the loading of git origins and vault cooking.

To execute the tests, simply execute the run_tests.sh script.

Related T1618

Diff Detail

Repository
rCDFD Dockerfiles for developers
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Update: Remove the use of docker-compose.override.yml file in the tests

Update: Ensure all swh services are up before running the tests

lgtm, but why bash instead of python?

Because I think that bash is more adequate when one only wants to run a couple of shell commands sequentially
and process their output / return code. The main idea here is "run a specific swh processing, exit with error
if something went wrong".

This tests implementation already enables me to find issues in our stack (see D1435 for instance).

This revision is now accepted and ready to land.May 9 2019, 9:28 AM

Update:

  • improve wait_for_service_output implementation
  • dump logs to a file on error
This revision was automatically updated to reflect the committed changes.