1# Copyright 2018 The Chromium OS Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5AUTHOR = "dhaddock, Chromium OS" 6NAME = "autoupdate_OmahaResponse.local" 7PURPOSE = "Test different things in the omaha response from your workstation." 8TIME = "MEDIUM" 9TEST_CATEGORY = "Functional" 10TEST_CLASS = "platform" 11TEST_TYPE = "server" 12DOC = """ 13Change the various arguments to the test to test different things in the 14omaha response. Example: 15 16switch_urls: Test switching between the two UrlBase URLs when there is an 17error downloading from the first URL. 18bad_sha256: Tests that when the SHA256 value is invalid the update fails. 19bad_metadata_size: Tests when the metadata size value is invalid the update 20fails. 21test_backoff: tests that we do/dont backoff when an update fails. 22backoff: True if we should backoff. False otherwise. 23 24""" 25 26from autotest_lib.client.common_lib import utils 27 28args_dict = utils.args_to_dict(args) 29 30def run(machine): 31 host = hosts.create_host(machine) 32 job.run_test('autoupdate_OmahaResponse', host=host, full_payload=True, 33 running_at_desk=True, switch_urls=False, bad_sha256=False, 34 bad_metadata_size=False, test_backoff=True, backoff=True, 35 **args_dict) 36 37job.parallel_simple(run, machines) 38