Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.indexer.tests.test_cli::test_cli_journal_client_index__origin_extrinsic_metadata[extrinsic-metadata]
Failed

TEST RESULT

Run At
Jul 21 2022, 12:04 PM
Details
cli_runner = <click.testing.CliRunner object at 0x7ff632d8ccf8> swh_config = '/tmp/pytest-of-jenkins/pytest-0/test_cli_journal_client_index_2/indexer.yml' kafka_prefix = 'xiymeuwckn', kafka_server = '127.0.0.1:36881' consumer = <cimpl.Consumer object at 0x7ff632dda188> idx_storage = <swh.indexer.storage.IndexerStorage object at 0x7ff632e66ac8> storage = <swh.storage.postgresql.storage.Storage object at 0x7ff632dca208> mocker = <pytest_mock.plugin.MockerFixture object at 0x7ff632dcaa58> swh_indexer_config = {'compute_checksums': ['blake2b512'], 'indexer_storage': {'cls': 'local', 'db': "user=postgres password=xxx dbname=tes...cheduler': {'cls': 'local', 'db': "user=postgres password=xxx dbname=tests host=127.0.0.1 port=20399 options=''"}, ...} indexer_name = 'extrinsic-metadata' @pytest.mark.parametrize("indexer_name", ["extrinsic-metadata", "*"]) def test_cli_journal_client_index__origin_extrinsic_metadata( cli_runner, swh_config, kafka_prefix: str, kafka_server, consumer: Consumer, idx_storage, storage, mocker, swh_indexer_config, indexer_name: str, ): """Test the 'swh indexer journal-client' cli tool.""" journal_writer = get_journal_writer( "kafka", brokers=[kafka_server], prefix=kafka_prefix, client_id="test producer", value_sanitizer=lambda object_type, value: value, flush_timeout=3, # fail early if something is going wrong ) origin = Origin("http://example.org/repo.git") storage.origin_add([origin]) raw_extrinsic_metadata = attr.evolve(REMD, target=origin.swhid()) raw_extrinsic_metadata = attr.evolve( raw_extrinsic_metadata, id=raw_extrinsic_metadata.compute_hash() ) journal_writer.write_additions("raw_extrinsic_metadata", [raw_extrinsic_metadata]) result = cli_runner.invoke( indexer_cli_group, [ "-C", swh_config, "journal-client", indexer_name, "--broker", kafka_server, "--prefix", kafka_prefix, "--group-id", "test-consumer", "--stop-after-objects", 1, ], catch_exceptions=False, ) # Check the output expected_output = "Done.\n" > assert result.exit_code == 0, result.output E AssertionError: Error: Unknown indexer: extrinsic-metadata E E assert 1 == 0 E + where 1 = <Result SystemExit(1)>.exit_code .tox/py3/lib/python3.7/site-packages/swh/indexer/tests/test_cli.py:716: AssertionError