summaryrefslogtreecommitdiffhomepage
path: root/test/test-manager/src
AgeCommit message (Collapse)AuthorFilesLines
2024-04-08Add ip override test for wireguardJoakim Hulthe2-0/+450
2024-03-27Refactor `mullvad-relay-selector`Markus Pettersson4-32/+33
Implement a system built on 'queries' for selecting appropriate relays. A query is a set of constraints which dictates which relay(s) that *can* be chosen by the relay selector. The user's settings can naturally be expressed as a query. The semantics of merging two queries in a way that always prefer user settings is defined by the new `Intersection` trait. Split `mullvad-relay-selector` into several modules: - `query.rs`: Definition of a query on different types of relays. This module is integral to the new API of `mullvad-relay-selector` - `matcher.rs`: Logic for filtering out candidate relays based on a query. - `detailer.rs`: Logic for deriving connection details for the selected relay. - `tests/`: Integration tests for the new relay selector. These tests only use the public APIs of `RelaySelector` and make sure that the output matches the expected output in different scenarios.
2024-03-26Enter blocking state correctly in upgrade testDavid Lönnhager1-2/+1
2024-03-25Make sure connecting works while API is unavailableMarkus Pettersson3-45/+104
2024-03-21Fix wonky timeouts in test_split_tunnelJoakim Hulthe1-3/+14
2024-03-20Merge test_mtu_detection_{windows,linux} testsJoakim Hulthe1-18/+2
2024-03-20Test leaking TCP/UDP/ICMP packets in split tunnelJoakim Hulthe3-98/+313
2024-03-20Group platform split tunnel tests under one testJoakim Hulthe1-4/+15
2024-03-20Add split tunnel test for windowsJoakim Hulthe1-25/+96
2024-03-20Make OVMF paths configurable per VMJoakim Hulthe2-8/+36
2024-03-20Use curl for split tunnel testJoakim Hulthe1-8/+13
2024-03-20Make e2e tests accept anyhow errorsJoakim Hulthe4-16/+14
2024-03-20Add basic split-tunnel testJoakim Hulthe2-1/+60
2024-03-12Update test-manager dep `inventory`Joakim Hulthe1-7/+5
2024-03-08Add MTU detection integration test for Linux and WindowsSebastian Holmin4-34/+148
Add dependency `scopeguard` for cleaning up nftables ruleset.
2024-02-27Replace err_derive with thiserrorJoakim Hulthe6-67/+65
`err_derive` is unmaintained and will probably stop working with rust edition 2024. `thiserror` is almost a drop-in replacement. This commit simply replaces all occurences of `derive(err_derive::Error)` with `derive(thiserror::Error)` and fixes the attributes, but the Error and Display impls should be identical.
2024-02-19Fix redundant importsDavid Lönnhager1-1/+1
2024-02-16Refactor API access methodsDavid Lönnhager1-4/+1
2024-02-16Run `import-settings` UI tests in test frameworkMarkus Pettersson1-0/+11
2024-02-15Enable access method GUI test in e2e testingMarkus Pettersson3-18/+104
Since `test_custom_access_methods_ui` may fail after messing with the test runner environment, we want to fail fast and abort the entire test run if the test fails before managing to clean up.
2024-02-15Fix unhelpful error messageMarkus Pettersson1-3/+4
2024-02-15Add integration tests for API access methodsMarkus Pettersson2-0/+75
Add Shadowsocks & SOCKS5 (remote) access method tests. Simply try to access the Mullvad API using these custom access methods.
2024-02-15Fix off-by-one error when choosing access method candidatesMarkus Pettersson2-14/+15
2024-02-08Add local SOCKS bridge testDavid Lönnhager1-1/+105
2024-02-08Add test for remote custom SOCKS5 bridgeDavid Lönnhager1-3/+98
2024-02-07Add RPCs for running TCP forwarder on test runnerDavid Lönnhager1-1/+1
2024-02-07Move testing SOCKS server to own crateDavid Lönnhager1-29/+7
2024-02-07Add SOCKS5 server to test-managerDavid Lönnhager2-0/+34
2024-02-06Simplify how settings are reset in testsDavid Lönnhager3-76/+9
2024-02-01Set serial baud rate to zero on macOSLinus Färnstrand1-1/+6
2024-01-18Print if lockdown mode is enabled when disconnected for `mullvad status`Sebastian Holmin3-5/+5
Add `locked_down` field to disconnected tunnel state.
2024-01-17Ignore PQ setting in tests where it's irrelevantDavid Lönnhager1-1/+1
2024-01-17Make test_installation_idempotency succeed when there is no accountDavid Lönnhager1-4/+9
2024-01-17Return specific error when connect_and_wait fails due to entering the error ↵David Lönnhager2-4/+8
state
2024-01-17Make changelog link static in testDavid Lönnhager1-1/+1
2024-01-15Use type safe Mullvad protobuf client over generated ditoMarkus Pettersson12-358/+273
Re-write some code in the test framework to prefer the type safe wrapper around the Mullvad app gRPC client instead of its auto-generated dito. `ManagementServiceClient` is automatically generated from the protobuf definitions found in `management_interface.proto`, and contains some very crude types. The `MullvadProxyClient` is a type-safe wrapper around `ManagementServiceClient` which performs conversions & validation of the data types from the gRPC server (the daemon) to their respective mappings in the `talpid-*` and `mullvad-*` crates. These types are more ergonomic to work with, and since we already have the conversions in place we should prefer those.
2024-01-12Add e2e test for containers on LinuxDavid Lönnhager2-0/+68
2024-01-11Synchronize `mullvad-api` and `mullvad-daemon` when the `api-override`Markus Pettersson1-3/+3
feature is enabled Move the logic for using overridden API endpoints for API calls from `mullvad-api::rest` to `mullvad_daemon::api`. This is in line with how the interaction between the two crates work for a normal release build, i.e. when the `api-override` feature is disabled. This commit also removes references to `force_direct_connection` in the Android code. The flag does not exist in the `mullvad-*` rust crates anymore, so it would be erroneous to try to serialize/deserialize the value from the Android client.
2024-01-09Exit immediately if ssh-setup.sh failsDavid Lönnhager1-1/+10
2024-01-08Add 'skipped' status to test summaryDavid Lönnhager2-29/+68
2024-01-08Add 'target_os' attribute to test macroDavid Lönnhager8-7/+33
2024-01-08Remove `ApiEndpointUpdateHandler`Markus Pettersson1-4/+1
Previously, the `mullvad-api` would tell the `mullvad-daemon` that it wanted a new API endpoint by calling a certain callback (`ApiEndpointUpdateCallback`), which would asynchronously resolve a new API endpoint and tell the daemon to punch an appropriate hole in the firewall for that particular endpoint before the `mullvad-api` crate would consume it. The logic of the callback can be moved inside `AccessModeSelector`, which simplifies the contract between `mullvad-daemon` and `mullvad-api` somewhat.
2024-01-04Fix code not following new linting rules in testing frameworkLinus Färnstrand3-4/+4
2024-01-03Allow app to use custom socks5 and shadwosocks proxiesJonathan1-8/+5
This PR has a couple of different purposes - Allow users to use socks5 local proxies with the CLI without having to be root nor use split-tunneling. This only works for OpenVPN. - Unify the types used by different proxy parts of the codebase, such as the Access Methods as well as some already existing OpenVPN proxy code. This PR changes the firewall on all desktop platforms as well as changes the routing table slightly on MacOS and Windows. On Linux the firewall code is modified to apply the appropriate firewall marks to all packages that go to a remote endpoint corresponding to the remote part of a local socks5 proxy. The firewall marks will allow the routing to be done without having to modify the routing table. On MacOS and Windows the routing table is modified to allow packages to go to that same endpoint to pass outside the VPN tunnel, it will additionally punch a hole in the firewall. The PR also migrates the settings file from version 7 to version 8 in order to properly and neatly unify Proxy related types. Finally it provides some slight extensions to the gRPC interface in order to allow for control over the custom proxy settings.
2024-01-02Fix clippy lintsMarkus Pettersson4-25/+21
2023-12-21Remove `GetCurrentLocation`.Sebastian Holmin3-8/+5
Make the daemon send two tunnel state updates, one with out IP being empty, and another with it being filled when am.i.mullvad.net responds. Update CLI for this change. Other front ends are left out.
2023-12-15[Clippy] Fix unused `async`Markus Pettersson2-3/+3
2023-12-07Refactor `start_packet_monitor_for_interface`Markus Pettersson1-35/+31
Flatten the inner loop of `start_packet_monitor_for_interface` by using `tokio::select!` instead of composing `futures::select`
2023-12-07RefactoringMarkus Pettersson2-23/+35
- Import qualified `network_monitor` - Add `obtain_guest_ip` - Fix docs
2023-12-07Refactor `test_upgrade_app` to use `Pinger` for leak testingMarkus Pettersson2-54/+9