Skip to content

Throw an exception if system test file is not found

Created by: matthew-d-jones

Issue reference / description

Closes #204 (closed)

Shows a clear error if one of the required files for system tests is not found at the path specified when running pytest:

Exception: The file MB18Freia.json does not exist at the given path ./data

This is important as we are using files on owncloud which may be moved or removed. Without this change we got the following error instead:

efu_1         | terminate called after throwing an instance of 'std::__ios_failure'
efu_1         |   what():  basic_filebuf::underflow error reading the file: iostream error

This change can be tested by running the system tests locally with a correct or incorrect path to the test data. Instructions on how to run the tests are here: https://github.com/ess-dmsc/event-formation-unit/blob/master/system-tests/README.md

Checklist for submitter

  • Check for conflict with integration test
  • Unit tests pass

Nominate for Group Code Review (Anyone can nominate it)

Indicate if you think the code should be reviewed in a Thursday code review session.

  • Recommend for group code review

Also, nominate it on the code_review Slack channel.

Merge request reports

Loading