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.
4
5AUTHOR = 'timkovich'
6TIME = 'SHORT'
7NAME = 'policy_GlobalNetworkSettingsServer.AllowOnlyPolicyNetworksToConnectIfAvailable'
8TEST_TYPE = 'Server'
9# Disable this test until it can be fixed: http://b/170942348
10# ATTRIBUTES = 'suite:ent-wificell'
11DEPENDENCIES = 'wificell'
12
13DOC = """
14This test sets up a policy and user defined network. The
15GlobalNetworkConfiguration policy 'AllowOnlyPolicyNetworksToConnectIfAvailable'
16is set to True. Only the policy defined network should be allowed to connect.
17The test then turns off the policy network and the user network should be
18allowed to connect.
19
20"""
21
22def run(machine):
23    host = hosts.create_host(machine)
24    job.run_test('policy_GlobalNetworkSettingsServer',
25                 raw_cmdline_args=args,
26                 host=host,
27                 gnc_settings={
28                    'AllowOnlyPolicyNetworksToConnectIfAvailable': True
29                 })
30
31
32parallel_simple(run, machines)
33