blob: 7acd33f8b86c8e40fc321916277190709d15c9da [file] [log] [blame]
# Copyright 2018 The Chromium 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 = [
'catapult',
'recipe_engine/file',
'recipe_engine/raw_io',
'recipe_engine/json',
]
def RunSteps(api):
# Show help.
api.catapult('help')
# Upload a histogram set to the Catapult dashboard.
result = api.catapult.upload(
input_file=api.json.input({}),
timeout='30s',
# Verify kwargs are passed to the generated step
stdout=api.raw_io.output(),
step_test_data=(lambda: api.raw_io.test_api.stream_output('success!')),
).stdout
assert result == 'success!'
assert api.catapult.is_catapult_file('path/to/file.catapult_json')
assert not api.catapult.is_catapult_file('path/to/file.json')
# Upload a histogram set without timeout.
api.catapult.upload(input_file=api.json.input({}))
def GenTests(api):
yield api.test('basic')