blob: c099e68a818e2b483980e4810f5cc222364798c3 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'bqupload',
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/raw_io',
'recipe_engine/step',
]
def RunSteps(api):
temp_dict = {
'Name': 'Name',
'Value': 1,
}
data_file = api.path['tmp_base'].join('data.json')
api.step(
'write json to file', ['cat', api.json.input(temp_dict)],
stdout=api.raw_io.output(leak_to=data_file))
api.bqupload.insert(
step_name='bqupload insert',
project='gcloud_project',
dataset='dataset',
table='table',
data_file=data_file)
def GenTests(api):
yield api.test('basic')