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" 12PY_VERSION = 3 13DOC = """ 14Change the various arguments to the test to test different things in the 15omaha response. Example: 16 17switch_urls: Test switching between the two UrlBase URLs when there is an 18error downloading from the first URL. 19bad_sha256: Tests that when the SHA256 value is invalid the update fails. 20bad_metadata_size: Tests when the metadata size value is invalid the update 21fails. 22test_backoff: tests that we do/dont backoff when an update fails. 23backoff: True if we should backoff. False otherwise. 24 25""" 26 27from autotest_lib.client.common_lib import utils 28 29args_dict = utils.args_to_dict(args) 30 31def run(machine): 32 host = hosts.create_host(machine) 33 job.run_test('autoupdate_OmahaResponse', host=host, full_payload=True, 34 switch_urls=False, bad_sha256=False, bad_metadata_size=False, 35 test_backoff=True, backoff=True, running_at_desk=True, 36 **args_dict) 37 38job.parallel_simple(run, machines) 39