e2e_tests.test_mdm package

Submodules

e2e_tests.test_mdm.test_mdm_multi_org module

e2e_tests.test_mdm.test_mdm_multi_org.test_basic_org_switch(warp: WarpActions)

Test basic org switching between 2 organizations that are defined in the MDM file

Test Steps:
  1. Define MDM file with 2 different organizations

  2. Deploy MDM file to test system

  3. Ensure that listed organizations from warp-cli match as defined in MDM

  4. Log in to first organization

  5. Confirm organization details

  6. Log in to second organization

  7. Confirm organization details

e2e_tests.test_mdm.test_mdm_multi_org.test_live_replace_mdm(warp: WarpActions)

Test replacing the MDM while connected and ensure that WARP updates to reflect the new settings in the MDM

Test Steps:
  1. Define MDM file with protocol set to MASQUE

  2. Deploy MDM file to test system

  3. Ensure that listed definitions

  4. Set first definition

  5. Confirm tunnel protocol

  6. Set second definition

  7. Confirm tunnel protocol

  8. Set first definition again

  9. Confirm tunnel protocol

e2e_tests.test_mdm.test_mdm_multi_org.test_protocol_switch(warp: WarpActions)

Test switching between 2 organization definitions that are defined in the MDM file with different tunnel protocols

Test Steps:
  1. Define MDM file with 2 definitions with different tunnel protocols defined

  2. Deploy MDM file to test system

  3. Ensure that listed definitions match the defined WireGuard and MASQUE profiles

  4. Set first definition (MASQUE)

  5. Confirm tunnel protocol is MASQUE in settings

  6. Set second definition (WireGuard)

  7. Confirm tunnel protocol is WireGuard in settings

  8. Set first definition again (MASQUE)

  9. Confirm tunnel protocol is MASQUE in settings

e2e_tests.test_mdm.test_mdm_multi_org.test_switching_from_non_registered_mdm_config(warp: WarpActions)
Test org switching between 2 organizations that are defined in the MDM file

when one of the organizations is not registered

Test Steps:
  1. Connect and verify connection to first organization (AutoWARP)

  2. Add a second MDM config (AutoWARPc) without enrollment

  3. Apply the MDM config and set it as active

  4. Verify device is not registered after switching to AutoWARPc

  5. Switch back to AutoWARP and verify connection

  6. Confirm successful connection to enterprise network

e2e_tests.test_mdm.test_mdm_settings module

e2e_tests.test_mdm.test_mdm_settings.test_admin_override_code(warp: WarpActions, dashboard: DashboardActions, override_code_key: str)

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_mdm.test_mdm_settings.test_endpoint_overrides_gateway_doh(warp: WarpActions, system: SystemActions, warp_protocol: WarpProtocols, ip_address_type: Literal['ipv6', 'ipv4'])

This test will test the MDM parameters override_doh_endpoint for Gateway with DoH operation mode

Steps: 1. Enroll device in organization 2. Set MDM with API and DoH override adresses set 3. Set device profile WARP mode 4. Confirm nominal operation of WARP on test node (connect and verify connection is functional) 5. Confirm no requests made to overridden addresses

e2e_tests.test_mdm.test_mdm_settings.test_endpoint_overrides_warp(warp: WarpActions, system: SystemActions, warp_protocol: WarpProtocols, ip_address_type: Literal['ipv6', 'ipv4'])

This test will test the MDM parameters override_api_endpoint, override_warp_endpoint for WARP operation mode

Steps: 1. Enroll device in organization 2. Set MDM with API and WARP override adresses set 3. Set device profile WARP mode 4. Confirm nominal operation of WARP on test node (connect and verify connection is functional) 5. Confirm no requests made to overridden addresses

e2e_tests.test_mdm.test_mdm_settings.test_warp_auto_connect(warp: WarpActions)

Test for ‘auto_connect’ parameter in MDM. MDM will be applied with switch locked and unlocked and test that the warp-cli connect/disconnect commands work properly

Test Steps:
  1. Set AutoConnect in mdm file to 1 minute with AutoWARP organization details

  2. Wait for setting to be reflected in warp-cli settings list

  3. Connect WARP

  4. Disconnect WARP

  5. Wait for 55 seconds ensuring that WARP does not reconnect during this time

  6. Wait for another 10 seconds and ensure that WARP DOES reconnect during this time

  7. Disconnect from WARP

  8. Clear MDM and reset enrollment

9. Set AutoConnect to 0 in MDM file with AutoWARP organization details 9. Wait for settings to reflect AutoConnect set to 0 10. Connect to WARP 11. Disconnect from WARP 12. Wait 65 seconds to ensure that WARP did not reconnect within that time limit

e2e_tests.test_mdm.test_mdm_settings.test_warp_switch_locked(warp: WarpActions)

Test for ‘switch_locked’ parameter in MDM. MDM will be applied with switch locked and unlocked and test that the warp-cli connect/disconnect commands work properly

e2e_tests.test_mdm.test_mdm_settings.test_warp_switch_unlocked(warp: WarpActions)

Test for ‘switch_locked’ parameter in MDM. MDM will be applied with switch locked and unlocked and test that the warp-cli connect/disconnect commands work properly