Documentation
¶
Overview ¶
Package network contains local Tast tests that exercise the Chrome OS network stack.
Index ¶
- func ARCVPNConnect(ctx context.Context, s *testing.State)
- func ARCVPNCrash(ctx context.Context, s *testing.State)
- func ARCVPNDisabled(ctx context.Context, s *testing.State)
- func BasicProfileProperties(ctx context.Context, s *testing.State)
- func CellularPolicyConnection(ctx context.Context, s *testing.State)
- func CellularPolicyInstall(ctx context.Context, s *testing.State)
- func CertSettingsPage(ctx context.Context, s *testing.State)
- func ConfigureServiceForProfile(ctx context.Context, s *testing.State)
- func ConfigureServiceForUserProfile(ctx context.Context, s *testing.State)
- func ConnectivityDiagnosticsApp(ctx context.Context, s *testing.State)
- func DNSProxy(ctx context.Context, s *testing.State)
- func DNSProxyCaptivePortal(ctx context.Context, s *testing.State)
- func DNSProxyCaptivePortalRelog(ctx context.Context, s *testing.State)
- func DNSProxyOverVPN(ctx context.Context, s *testing.State)
- func DefaultProfile(ctx context.Context, s *testing.State)
- func DefaultProfileServices(ctx context.Context, s *testing.State)
- func DiagFailDNSResolution(ctx context.Context, s *testing.State)
- func DiagFailDNSResolverPresent(ctx context.Context, s *testing.State)
- func DiagFailFirewall(ctx context.Context, s *testing.State)
- func DiagFailLANConnectivity(ctx context.Context, s *testing.State)
- func DiagPassing(ctx context.Context, s *testing.State)
- func Ethernet8021X(fullCtx context.Context, s *testing.State)
- func EthernetStaticIP(ctx context.Context, s *testing.State)
- func ProxyResolutionService(ctx context.Context, s *testing.State)
- func ResolveLocalHostname(ctx context.Context, s *testing.State)
- func ResolveLocalHostnameInvalidAddress(ctx context.Context, s *testing.State)
- func ShillEthernetReady(ctx context.Context, s *testing.State)
- func ShillInitLoginGuestScript(ctx context.Context, s *testing.State)
- func ShillInitLoginScript(ctx context.Context, s *testing.State)
- func ShillInitLogoutScript(ctx context.Context, s *testing.State)
- func ShillInitScriptsLoginMultiProfile(ctx context.Context, s *testing.State)
- func ShillInitScriptsLoginProfileExists(ctx context.Context, s *testing.State)
- func ShillInitScriptsLoginStartShill(ctx context.Context, s *testing.State)
- func ShillInitScriptsStartLoggedin(ctx context.Context, s *testing.State)
- func ShillNoErrorsInLog(ctx context.Context, s *testing.State)
- func ShillStability(ctx context.Context, s *testing.State)
- func StorkProfile(ctx context.Context, s *testing.State)
- func SupportedProtocols(ctx context.Context, s *testing.State)
- func SystemProxyForArc(ctx context.Context, s *testing.State)
- func SystemProxyForSystemServices(ctx context.Context, s *testing.State)
- func TestProxyServer(ctx context.Context, s *testing.State)
- func TwoShills(ctx context.Context, s *testing.State)
- func VPNConnect(ctx context.Context, s *testing.State)
- func VPNMojoConf(ctx context.Context, s *testing.State)
- func VPNPolicy(ctx context.Context, s *testing.State)
- type AllowlistService
- func (a *AllowlistService) CheckArcAppInstalled(ctx context.Context, req *network.CheckArcAppInstalledRequest) (*empty.Empty, error)
- func (a *AllowlistService) CheckExtensionInstalled(ctx context.Context, req *network.CheckExtensionInstalledRequest) (*empty.Empty, error)
- func (a *AllowlistService) GaiaLogin(ctx context.Context, req *network.GaiaLoginRequest) (*empty.Empty, error)
- func (a *AllowlistService) SetupFirewall(ctx context.Context, req *network.SetupFirewallRequest) (*empty.Empty, error)
- type BluetoothService
- func (s *BluetoothService) GetBluetoothBootPref(ctx context.Context, req *network.GetBluetoothBootPrefRequest) (*network.GetBluetoothBootPrefResponse, error)
- func (s *BluetoothService) GetBluetoothPoweredFast(ctx context.Context, _ *empty.Empty) (*network.GetBluetoothPoweredFastResponse, error)
- func (s *BluetoothService) SetBluetoothPowered(ctx context.Context, req *network.SetBluetoothPoweredRequest) (*empty.Empty, error)
- func (s *BluetoothService) SetBluetoothPoweredFast(ctx context.Context, req *network.SetBluetoothPoweredFastRequest) (*empty.Empty, error)
- func (s *BluetoothService) ValidateBluetoothFunctional(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)
- type ProxyService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ARCVPNConnect ¶
ARCVPNConnect differs from VPNConnect in that ARCVPNConnect focuses on testing the VPN that's started in ARC to mirror the host VPN. See b/147256449 for more details. Much of the testing around host VPN setup is left to VPNConnect to verify.
func ConnectivityDiagnosticsApp ¶
ConnectivityDiagnosticsApp ensures that the connectivity diagnostics application launches and displays the HTML.
func DNSProxy ¶
DNSProxy tests DNS functionality with DNS proxy active. There are 2 parts to this test: 1. Ensuring that DNS queries are successful. 2. Ensuring that DNS queries are using proper mode (Off, Automatic, Always On) by blocking the expected ports, expecting the queries to fail.
func DNSProxyOverVPN ¶
DNSProxyOverVPN tests DNS functionality with DNS proxy active. There are 3 parts to this test: 1. Ensuring that DNS queries over VPN are successful. 2. Ensuring that DNS queries (except from system) are routed properly through VPN by blocking VPN DNS ports, expecting the queries to fail. 3. Ensuring that DNS queries (except from system) are not using DNS-over-HTTPS when a VPN is on.
func DiagFailDNSResolution ¶
DiagFailDNSResolution tests that when the domain name server (DNS) cannot resolve requests the network diagnostic routine can detect this condition.
func DiagFailDNSResolverPresent ¶
DiagFailDNSResolverPresent tests that when the domain name server (DNS) are misconfigured that the network routine reports the correct errors.
func DiagFailFirewall ¶
DiagFailFirewall tests that when network traffic is blocked on port 80 and 443 the network diagnostic routine can detect this condition.
func DiagFailLANConnectivity ¶
DiagFailLANConnectivity tests that when the ethernet technology is disabled, the LANConnectivity network diagnostic routine fails.
func DiagPassing ¶
DiagPassing is a parameterized test that ensures that network diagnostic routines will pass with a normal network connection.
func Ethernet8021X ¶
Ethernet8021X tests 802.1X over Ethernet, using a virtual Ethernet pair. For the authentication server, use the EAP server built into hostapd.
Test outline:
- Start up hostapd on one end of the link
- Ensure client link (managed by Shill) transitions to "EAP detected"
- Configure client EAP parameters in Shill
- Ensure client transitions to "EAP connected", hostapd transitions to "authorized"
- Perform client logout
- Ensure client transitions to "EAP not connected", hostapd transitions to "logoff"
- Re-login client
- Ensure client transitions back to "EAP connected", hostapd transitions to "authorized"
Note that we only test that authentication completes successfully; we don't, e.g., start up a DHCP server, so the client never actually gets an IP address. Real 802.1X-enabled switches would typically have additional infrastructure to bridge the client over to the "main" network after authentication; hostapd doesn't implement this feature, and we consider that beyond the scope of an "authentication" test.
func TestProxyServer ¶
TestProxyServer verifies that proxy.Server with authentication is working as expected.
Types ¶
type AllowlistService ¶
type AllowlistService struct {
// contains filtered or unexported fields
}
AllowlistService implements the tast.cros.network.AllowlistService gRPC service.
func (*AllowlistService) CheckArcAppInstalled ¶
func (a *AllowlistService) CheckArcAppInstalled(ctx context.Context, req *network.CheckArcAppInstalledRequest) (*empty.Empty, error)
CheckArcAppInstalled verifies that ARC provisioning and installing ARC apps by checking that force installed apps are successfully installed.
func (*AllowlistService) CheckExtensionInstalled ¶
func (a *AllowlistService) CheckExtensionInstalled(ctx context.Context, req *network.CheckExtensionInstalledRequest) (*empty.Empty, error)
CheckExtensionInstalled verifies that specified extension is installed by performing a full-text search on the chrome://extensions page.
func (*AllowlistService) GaiaLogin ¶
func (a *AllowlistService) GaiaLogin(ctx context.Context, req *network.GaiaLoginRequest) (*empty.Empty, error)
func (*AllowlistService) SetupFirewall ¶
func (a *AllowlistService) SetupFirewall(ctx context.Context, req *network.SetupFirewallRequest) (*empty.Empty, error)
type BluetoothService ¶
type BluetoothService struct {
// contains filtered or unexported fields
}
BluetoothService implements tast.cros.network.BluetoothService gRPC service.
func (*BluetoothService) GetBluetoothBootPref ¶
func (s *BluetoothService) GetBluetoothBootPref(ctx context.Context, req *network.GetBluetoothBootPrefRequest) (*network.GetBluetoothBootPrefResponse, error)
GetBluetoothBootPref gets the Bluetooth boot preference.
func (*BluetoothService) GetBluetoothPoweredFast ¶
func (s *BluetoothService) GetBluetoothPoweredFast(ctx context.Context, _ *empty.Empty) (*network.GetBluetoothPoweredFastResponse, error)
GetBluetoothPoweredFast checks whether the Bluetooth adapter is enabled.
func (*BluetoothService) SetBluetoothPowered ¶
func (s *BluetoothService) SetBluetoothPowered(ctx context.Context, req *network.SetBluetoothPoweredRequest) (*empty.Empty, error)
SetBluetoothPowered sets the Bluetooth adapter power status via settingsPrivate. This setting persists across reboots.
func (*BluetoothService) SetBluetoothPoweredFast ¶
func (s *BluetoothService) SetBluetoothPoweredFast(ctx context.Context, req *network.SetBluetoothPoweredFastRequest) (*empty.Empty, error)
SetBluetoothPoweredFast sets the Bluetooth adapter power status via D-Bus. This setting does not persist across boots.
func (*BluetoothService) ValidateBluetoothFunctional ¶
func (s *BluetoothService) ValidateBluetoothFunctional(ctx context.Context, _ *empty.Empty) (*empty.Empty, error)
ValidateBluetoothFunctional checks to see whether the Bluetooth device is usable.
type ProxyService ¶
type ProxyService struct {
// contains filtered or unexported fields
}
ProxyService implements the tast.cros.network.ProxyService gRPC service.
func (*ProxyService) StartServer ¶
func (s *ProxyService) StartServer(ctx context.Context, request *network.StartServerRequest) (*network.StartServerResponse, error)
StartServer starts a new proxy server instance with a specific configuration. This is the implementation of network.ProxyService/Start gRPC.
func (*ProxyService) StopServer ¶
StopServer stops a previously started server instance. Returns an error if no proxy server instance was started on the DUT. This is the implementation of network.ProxyService/Stop gRPC.
Source Files
¶
- allowlist_service.go
- arc_vpn_connect.go
- arc_vpn_crash.go
- arc_vpn_disabled.go
- basic_profile_properties.go
- bluetooth_service.go
- cellular_policy_connection.go
- cellular_policy_install.go
- cert_settings_page.go
- configure_service_for_profile.go
- configure_service_for_user_profile.go
- connectivity_diagnostics_app.go
- default_profile.go
- default_profile_services.go
- diag_fail_dns_resolution.go
- diag_fail_dns_resolver_present.go
- diag_fail_firewall.go
- diag_fail_lan_connectivity.go
- diag_passing.go
- dns_proxy.go
- dns_proxy_captive_portal.go
- dns_proxy_captive_portal_relog.go
- dns_proxy_over_vpn.go
- doc.go
- ethernet_8021x.go
- ethernet_static_ip.go
- proxy_resolution_service.go
- proxy_service.go
- resolve_local_hostname.go
- resolve_local_hostname_invalid_address.go
- shill_ethernet_ready.go
- shill_init_login_guest_script.go
- shill_init_login_script.go
- shill_init_logout_script.go
- shill_init_scripts_login_multi_profile.go
- shill_init_scripts_login_profile_exists.go
- shill_init_scripts_login_start_shill.go
- shill_init_scripts_start_loggedin.go
- shill_no_errors_in_log.go
- shill_stability.go
- stork_profile.go
- supported_protocols.go
- system_proxy_for_arc.go
- system_proxy_for_system_services.go
- test_proxy_server.go
- two_shills.go
- vpn_connect.go
- vpn_mojo_conf.go
- vpn_policy.go
Directories
¶
Path | Synopsis |
---|---|
Package arcvpn interacts with the ARC-side fake VPN.
|
Package arcvpn interacts with the ARC-side fake VPN. |
Package chroot implements a chroot environment that runs in a separate network namespace from the caller.
|
Package chroot implements a chroot environment that runs in a separate network namespace from the caller. |
Package diag is a library of functionality to utilize the built-in Chrome network diagnostic routines.
|
Package diag is a library of functionality to utilize the built-in Chrome network diagnostic routines. |
Package dns provides utilities for DNS tests.
|
Package dns provides utilities for DNS tests. |
Package firewall is a library with utilities for creating an on device firewall
|
Package firewall is a library with utilities for creating an on device firewall |
Package pre contains preconsitions for network tests.
|
Package pre contains preconsitions for network tests. |
Package proxy allows running an http proxy server on the DUT for tests.
|
Package proxy allows running an http proxy server on the DUT for tests. |
Package shill contains library code for interacting with shill that is specific to the network testing package.
|
Package shill contains library code for interacting with shill that is specific to the network testing package. |
Package shillscript has helper functions and the dbus monitor implementation for the shill init scripts tests.
|
Package shillscript has helper functions and the dbus monitor implementation for the shill init scripts tests. |
Package veth contains utility functions for establishing virtual Ethernet pairs.
|
Package veth contains utility functions for establishing virtual Ethernet pairs. |
Package vpn provides utilities for setting up VPN clients and/or servers on DUT.
|
Package vpn provides utilities for setting up VPN clients and/or servers on DUT. |
Package wiredhostapd contains utilities for establishing a hostapd server for use with 'driver=wired' (i.e., Ethernet or similar).
|
Package wiredhostapd contains utilities for establishing a hostapd server for use with 'driver=wired' (i.e., Ethernet or similar). |