1# Copyright 2019 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. 4from autotest_lib.client.common_lib.cros import chrome 5from autotest_lib.client.cros.enterprise import enterprise_policy_base 6 7USERNAME = 'stressenroll@managedchrome.com' 8PASSWORD = 'test0000' 9 10 11class policy_EnrollmentRetainment( 12 enterprise_policy_base.EnterprisePolicyTest): 13 """Stress tests the enrollment by continiously restarting.""" 14 version = 1 15 16 17 def initialize(self, **kwargs): 18 self._initialize_enterprise_policy_test( 19 set_auto_logout=False, 20 env='prod', 21 username=USERNAME, 22 password=PASSWORD, 23 **kwargs) 24 25 26 def run_once(self): 27 """Entry point of this test.""" 28 29 with chrome.Chrome( 30 clear_enterprise_policy=False, 31 expect_policy_fetch=True, 32 disable_gaia_services=False, 33 gaia_login=True, 34 username=USERNAME, 35 password=PASSWORD) as self.cr: 36 # Policy that is set on cpanel side that is off by default. 37 self.verify_policy_value('DeviceAllowBluetooth', False) 38