Skip to content

ENH: new module which allows to register integration tests in caosdb instances

Alexander Schlemmer requested to merge f-register-integrationtests into dev

Summary

This is a proposal for an API to register integration tests.

Please see the documentation of register_tests.py for detailed information.

The API and its purpose is open for discussion and in principle open for changes and suggestions.

Related issue: https://gitlab.indiscale.com/caosdb/src/crawler2.0/-/issues/3 (maybe wrong place, but it came up during development of the new crawler framework)

Test Environment

Run an empty CaosDB instance and create a test file that uses the @pytest.fixture clear_database.

Also see documentation of the register_tests module and be careful with the CaosDB instance, as the fixture is intended to wipe a CaosDB instance.

Please test the behavior of the API for:

  • an empty database
  • a database with a registration with an unmatching KEY
  • a database with a registration with a matching KEY
  • a non-empty (test!) database without registration

Check List for the Author

Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines

  • All automated tests pass
  • Reference related Issues
  • Up-to-date CHANGELOG.md
  • Annotations in code (Gitlab comments)
    • Intent of new code
    • Problems with old code
    • Why this implementation?

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md
  • The test environment setup works and the intended behavior is reproducible in the test environment
  • In-code documentation and comments are up-to-date.
  • Check: Are there spezifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Timm Fitschen

Merge request reports