e2e_tests.test_pmtud package¶
Submodules¶
e2e_tests.test_pmtud.test_mtu_parser module¶
Test script to verify the MTU parsing functions work correctly.
- e2e_tests.test_pmtud.test_mtu_parser.test_mtu_parsing()¶
Test the MTU parsing function with sample netsh, ip link show, and macOS output.
e2e_tests.test_pmtud.test_pmtud module¶
- e2e_tests.test_pmtud.test_pmtud.get_macos_interface_name(node: BaseNode) str¶
Get the interface name for the specified service using scutil on macOS.
- Parameters:
node – The macOS node to execute commands on
- Returns:
The interface name (e.g., “utun4”)
- Return type:
str
- Raises:
RuntimeError – If the scutil command fails or interface not found
- e2e_tests.test_pmtud.test_pmtud.parse_linux_tunnel_mtu(ip_output: str, interface_name: str = 'CloudflareWARP') int¶
Parse the MTU value for the specified interface from ip link show command output.
- Parameters:
ip_output – The output from ‘ip link show’ command
interface_name – The name of the interface to find MTU for (default: “CloudflareWARP”)
- Returns:
The MTU value for the specified interface
- Return type:
int
- Raises:
ValueError – If the interface is not found or MTU cannot be parsed
- e2e_tests.test_pmtud.test_pmtud.parse_macos_tunnel_mtu(ifconfig_output: str, interface_name: str) int¶
Parse the MTU value for the specified interface from ifconfig command output.
- Parameters:
ifconfig_output – The output from ‘ifconfig <interface>’ command
interface_name – The name of the interface
- Returns:
The MTU value for the specified interface
- Return type:
int
- Raises:
ValueError – If MTU cannot be parsed
- e2e_tests.test_pmtud.test_pmtud.parse_windows_tunnel_mtu(netsh_output: str, interface_name: str = 'CloudflareWARP') int¶
Parse the MTU value for the specified interface from netsh interface ipv4 show subinterfaces output.
- Parameters:
netsh_output – The output from ‘netsh interface ipv4 show subinterfaces’ command
interface_name – The name of the interface to find MTU for (default: “CloudflareWARP”)
- Returns:
The MTU value for the specified interface
- Return type:
int
- Raises:
ValueError – If the interface is not found or MTU cannot be parsed
- e2e_tests.test_pmtud.test_pmtud.test_pmtud(warp: WarpActions, system: SystemActions)¶
Enterprise test that creates an mdm config and copies it to appropriate folder, then verifies behavior with switch_locked=true, admin override applied
- e2e_tests.test_pmtud.test_pmtud.verify_tunnel_mtu(node: BaseNode, expected_mtu: int, interface_name: str = 'CloudflareWARP') bool¶
Verify that the tunnel MTU matches the expected value on Windows, Linux, or macOS.
- Parameters:
node – The node to execute commands on
expected_mtu – The expected MTU value
interface_name – The name of the interface to check (default: “CloudflareWARP”)
- Returns:
True if MTU matches expected value, False otherwise
- Return type:
bool
- Raises:
RuntimeError – If the command fails or interface not found