def test_get_snap_channel_prod(raises, scopes, channel): task = {"scopes": scopes, "payload": {"channel": channel}} config = {"push_to_store": True} if raises: with pytest.raises(TaskVerificationError): get_snap_channel(config, task) else: assert get_snap_channel(config, task) == channel
def test_get_snap_channel_prod(raises, scopes, channel): task = {'scopes': scopes, 'payload': {'channel': channel}} config = {'push_to_store': True} if raises: with pytest.raises(TaskVerificationError): get_snap_channel(config, task) else: assert get_snap_channel(config, task) == channel
def test_old_get_snap_channel(raises, scopes, expected): task = {"scopes": scopes, "payload": {}} config = {"push_to_store": True} if raises: with pytest.raises(TaskVerificationError): get_snap_channel(config, task) else: assert get_snap_channel(config, task) == expected
async def async_main(context): context.task = client.get_task(context.config) # TODO Sanity checks on the file snap_file_path = artifacts.get_snap_file_path(context) channel = task.get_snap_channel(context.config, context.task) _log_warning_forewords(context.config, channel) snap_store.push(context, snap_file_path, channel)
def test_get_snap_channel_without_payload_raises(): task = {"payload": {}} config = {} with pytest.raises(TaskVerificationError): get_snap_channel(config, task)