def test_labels_metadata_plugin(tmpdir):

    koji_build_id = "1234"
    workflow = prepare()

    workflow.exit_results = {
        KojiPromotePlugin.key: koji_build_id,
    }

    runner = ExitPluginsRunner(
        None,
        workflow,
        [{
            'name': StoreMetadataInOSv3Plugin.key,
            "args": {
                "url": "http://example.com/"
            }
        }]
    )
    output = runner.run()
    assert StoreMetadataInOSv3Plugin.key in output
    labels = output[StoreMetadataInOSv3Plugin.key]["labels"]
    assert "koji-build-id" in labels
    assert labels["koji-build-id"] == koji_build_id
dataset/ETHPy150Open projectatomic/atomic-reactor/tests/plugins/test_store_metadata.py/test_labels_metadata_plugin/original