Esempio n. 1
0
def test_get_snap_file_path(monkeypatch, raises, returned, expected):
    context = None

    monkeypatch.setattr(artifacts, "get_upstream_artifacts_full_paths_per_task_id", lambda _: returned)
    if raises:
        with pytest.raises(TaskVerificationError):
            get_snap_file_path(context)
    else:
        assert get_snap_file_path(context) == expected
Esempio n. 2
0
async def async_main(context):
    context.task = client.get_task(context.config)
    _log_warning_forewords(context)

    # TODO Sanity checks on the file
    snap_file_path = artifacts.get_snap_file_path(context)
    channel = task.pluck_channel(context.task)
    snap_store.push(context, snap_file_path, channel)