blob: 34c94fffc8f5e1d2025ae5e6ada20060ffc9c539 [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
AUTHOR = 'timkovich'
TIME = 'SHORT'
NAME = 'policy_WiFiTypesServer.wpa_psk'
TEST_TYPE = 'Server'
ATTRIBUTES = 'suite:ent-wificell'
DEPENDENCIES = 'wificell'
DOC = """
'policy_WiFiTypesServer.wpa_psk' test configures an WPA-PSK network and runs
the client side 'policy_WiFiTypes' test that sets the user network policy and
attempts to connect.
"""
from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types
from autotest_lib.client.cros.enterprise.network_config import NetworkConfig
from autotest_lib.server.cros.network import hostap_config
def run(machine):
password = 'chromeos'
wpa_config = xmlrpc_security_types.WPAConfig(
psk=password,
wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA2,
wpa2_ciphers=[xmlrpc_security_types.WPAConfig.CIPHER_CCMP])
ap_config = hostap_config.HostapConfig(
channel=6,
mode=hostap_config.HostapConfig.MODE_11N_MIXED,
security_config=wpa_config)
network = NetworkConfig(password=password, security='WPA-PSK')
host = hosts.create_host(machine)
job.run_test('policy_WiFiTypesServer',
raw_cmdline_args=args,
host=host,
ap_config=ap_config,
network=network)
parallel_simple(run, machines)