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 5 AUTHOR = "dhaddock, Chromium OS" 6 NAME = "autoupdate_OmahaResponse.local" 7 PURPOSE = "Test different things in the omaha response from your workstation." 8 TIME = "MEDIUM" 9 TEST_CATEGORY = "Functional" 10 TEST_CLASS = "platform" 11 TEST_TYPE = "server" 12 DOC = """ 13 Change the various arguments to the test to test different things in the 14 omaha response. Example: 15 16 switch_urls: Test switching between the two UrlBase URLs when there is an 17 error downloading from the first URL. 18 bad_sha256: Tests that when the SHA256 value is invalid the update fails. 19 bad_metadata_size: Tests when the metadata size value is invalid the update 20 fails. 21 test_backoff: tests that we do/dont backoff when an update fails. 22 backoff: True if we should backoff. False otherwise. 23 24 """ 25 26 from autotest_lib.client.common_lib import utils 27 28 args_dict = utils.args_to_dict(args) 29 30 def 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 37 job.parallel_simple(run, machines) 38