blob: 5ecf0850de6b76daf631d00f0af188ebf46b518e [file] [log] [blame]
# Copyright (c) 2012 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.
# Test that we can use ConfigureService to create a WiFi
# service and connect to it. Test that after destroying
# the service via DeleteEntry, the GUID property of the
# service is no longer set. Test that performing another
# ConfigureService with a different passphrase succeeds,
# once by removing the previous configuration first, and
# a second time by simply modifying the current config.
{ "name":"ProfileGuid",
"steps":[
# Configure a WiFi service.
[ "client_configure_service",
{ "GUID": "01234",
"Type": "wifi",
"AutoConnect": "true",
"SSID": "ProfileGUID",
"Security": "psk",
"Passphrase": "chromeos",
"WiFi.HiddenSSID": "false" } ],
# Make that service visible on an AP.
[ "create", { "type":"hostap" } ],
[ "config", { "ssid":"ProfileGUID",
"channel":"2412", "mode":"11g",
"wpa":"1", "wpa_key_mgmt":"WPA-PSK",
"wpa_pairwise":"CCMP",
"wpa_passphrase":"chromeos" } ],
# Verify that we can connect using configured credentials.
[ "connect", { "ssid":"ProfileGUID" } ],
# Verify the service has the GUID property set.
[ "client_check_service_properties",
{ "service":"ProfileGUID",
"GUID": "01234" } ],
# Remove our configuration for the service (ignore any disconnection
# that may occur, since this is not a part of this test).
[ "client_profile_delete_entry",
{ "profile":"test",
"entry":"ProfileGUID" } ],
# Verify the service no longer has the GUID property set.
[ "!client_check_service_properties",
{ "service":"ProfileGUID",
"GUID": "01234" } ],
# Change the passphrase on the AP.
[ "config", { "ssid":"ProfileGUID",
"channel":"2412", "mode":"11g",
"wpa":"1", "wpa_key_mgmt":"WPA-PSK",
"wpa_pairwise":"CCMP",
"wpa_passphrase":"chromeos1" } ],
# Change the configuration using a new ConfigureService call.
[ "client_configure_service",
{ "GUID": "01234",
"Type": "wifi",
"AutoConnect": "true",
"SSID": "ProfileGUID",
"Security": "psk",
"Passphrase": "chromeos1",
"WiFi.HiddenSSID": "false" } ],
# Verify that we can connect using configured credentials.
[ "connect", { "ssid":"ProfileGUID" } ],
# Disconnect from the AP.
[ "disconnect" ],
# Change the passphrase again on the AP.
[ "config", { "ssid":"ProfileGUID",
"channel":"2412", "mode":"11g",
"wpa":"1", "wpa_key_mgmt":"WPA-PSK",
"wpa_pairwise":"CCMP",
"wpa_passphrase":"chromeos2" } ],
# Change the configuration using a another ConfigureService call,
# but this time we are modifying an existing entry instead of
# removing it first.
[ "client_configure_service",
{ "GUID": "01234",
"Passphrase": "chromeos2" } ],
# Verify that we can connect using configured credentials.
[ "connect", { "ssid":"ProfileGUID" } ],
[ "deconfig" ],
[ "destroy" ],
],
}