These tests create deposit and wait for them to be in the 'done' status.
Warning, this requires testinfra to be available (as well as docker-compose).
https://testinfra.readthedocs.io
Depends on D2489
Differential D2491
Add testinfra based e2e tests for the deposit douardda on Dec 20 2019, 2:32 PM. Authored by
Details
These tests create deposit and wait for them to be in the 'done' status. https://testinfra.readthedocs.io Depends on D2489
Diff Detail
Event TimelineComment Actions You could remove most of the code in your tests by using the code behind the Icinga plugin in D2484. It already handles generating an archive, checking the status periodically, etc. eg. test_create_deposit_simple could be rewritten as: from swh.icinga_plugins.deposit import DepositCheck def test_create_deposit_simple(host, sample_metadata, sample_archive): config = { 'metadata': sample_metadata, 'archive': sample_archive, 'username': 'test', 'password': 'test', 'server': 'http://nginx:5080/deposit/1', 'collection': 'test', 'critical': 60, # in seconds } deposit_check = DepositCheck(config) assert deposit_check.main() == 0
Comment Actions Update/fixes according vlorentz' comments aka:
|