diff --git a/integrationtests/test_crawler_main.py b/integrationtests/test_crawler_main.py index 3c0ec57e4b45da2c31569d3a0bb2e683f0c9b6fd..793dd6edab18eb03794bf8bd7c9e140047fc1b32 100644 --- a/integrationtests/test_crawler_main.py +++ b/integrationtests/test_crawler_main.py @@ -78,12 +78,15 @@ def test_not_implemented_list_with_authorization(caplog, clear_database): dirlist = [basepath / "dir1", basepath / "dir2"] # This is not implemented yet, so check log for correct error. - crawler_main( + ret = crawler_main( dirlist, cfood_file_name=basepath / "cfood.yml", identifiables_definition_file=basepath / "identifiable.yml", securityMode=SecurityMode.RETRIEVE ) + # crawler_main hides the error, but has a non-zero return code and + # errors in the log: + assert ret != 0 err_tuples = [t for t in caplog.record_tuples if t[1] == logging.ERROR] assert len(err_tuples) == 1 assert "currently implemented only for single paths, not for lists of paths" in err_tuples[0][2]