summaryrefslogtreecommitdiffhomepage
path: root/test/test-manager
AgeCommit message (Collapse)AuthorFilesLines
2024-01-15Use type safe Mullvad protobuf client over generated ditoMarkus Pettersson14-369/+284
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-11Add package metadata to crates in testing frameworkLinus Färnstrand2-4/+12
Such as authors, repository, licence etc. And have all crates inherit from the workspace
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-09Remove version and publish cargo metadataLinus Färnstrand2-2/+0
Since Rust 1.75.0 the `version` field is optional. The version defaults to "0.0.0" if it's not specified, and `publish` defaults to false if no version has been given. So by not specifying a version we get both `version = "0.0.0" and `publish = false` "for free"
2024-01-08Add 'skipped' status to test summaryDavid Lönnhager2-29/+68
2024-01-08Add 'target_os' attribute to test macroDavid Lönnhager9-11/+60
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-04Add workspace level linting to test workspaceLinus Färnstrand1-0/+3
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-14Add documentation on the configuration format used by `test-manager`Markus Pettersson2-1/+74
2023-12-14Improve test framework documentionMarkus Pettersson1-0/+5
- Try to simplify the steps involved in creating a new test runner - Move `BUILD_OS_IMAGE` to `docs/`.
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
2023-12-07Add ping monitoring to `helpers.rs`Markus Pettersson2-46/+131
2023-12-07Add regression test checking idempotency of app installationMarkus Pettersson1-2/+96
Installing the app twice (or more times) should have the same observable effect as installing it once. If the app is upgraded and the user is in a connected state before starting the upgrade, no traffic should leak during the installation process and the app should start up in a connected state preserving the relay constraints.
2023-12-06Remove superseded RPC for restarting the Mullvad system serviceMarkus Pettersson2-37/+22
The function `set_mullvad_daemon_service_state(on: bool) -> Result<(), test_rpc::Error>`, which would conditionally start or stop the Mullvad daemon in the test runner, has been superseded by two separate functions which accomplish the same thing: `start_mullvad_daemon` & `stop_mullvad_daemon`.
2023-12-06Add `test_connecting_state_when_corrupted_state_cache`Markus Pettersson1-7/+43
Add regression test which checks that the daemon successfully recovers from a corrupt target state cache. If the target state cache is corrupt, the daemon will default to the `Connecting` target state on startup.
2023-12-06Implement RPC for reading & writing to app cache fileMarkus Pettersson1-2/+32
- Implement RPC for writing to a file in a test runner / guest VM. - Implement RPC for getting app cache directory - Implement RPC for restarting the app in a test runner / guest vm - Implement RPC for starting the app in a test runner / guest vm - Implement RPC for stopping the app in a test runner / guest vm - Implement `find_cache_traces` on Window & macOS
2023-11-22Remove relay selection logic from multihop and udp2tcp tests (same as ↵David Lönnhager3-83/+49
test_bridge)
2023-11-22Obtain tunnel interface from management interface in testsDavid Lönnhager7-111/+161
2023-11-16Let relay selector pick entry & exit nodes in `test_bridge`Markus Pettersson2-68/+45
We have seen `test_bridge` fail due to high latency if slow + far-away servers were selected. Hopefully delegating the task of picking appropriate entry & exit relays will help mitigate this.
2023-11-16test-framework: Prefer types from `mullvad-types`Markus Pettersson5-64/+101
Prefer types from `mullvad-types` over equivavelent types defined in `mullvad-management-interface`.
2023-10-31Update e2e testsDavid Lönnhager5-90/+59
2023-10-31Replace UpdateRelaySettings with SetRelaySettingsDavid Lönnhager5-22/+22
2023-10-24Reset all relay constraints in testsDavid Lönnhager1-2/+10
2023-10-24Prefer `mullvad_types` types over generated tonic typesMarkus Pettersson2-36/+29
2023-10-24Document & simplify `reset_relay_settings`Markus Pettersson1-18/+18
2023-10-24Refactor move `reboot` to `helpers.rs`Markus Pettersson2-15/+18
2023-10-24Remove superflous location constraints from multiple test casesMarkus Pettersson1-19/+0
2023-10-24Upload e2e-test report matrixMarkus Pettersson1-3/+0
Upload e2e-test report matrix as an `.html` file and submit it to github actions job summary: https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/
2023-10-24Set up dummy interface on macOSDavid Lönnhager1-2/+36
2023-10-24Make WireGuard interface temporary during test runDavid Lönnhager1-18/+45
2023-10-24Fully abort all tasks before leaving a testDavid Lönnhager3-79/+119
2023-10-20Relax relay constraints in `test_quantum_resistant_multihop_udp2tcp_tunnel`Markus Pettersson1-24/+25
Loosen up relay constraints in `test_quantum_resistant_multihop_udp2tcp_tunnel`, which makes the test more resilient to changes in the testing environment.
2023-10-20Add desktop end-to-end testsDavid Lönnhager36-0/+7408
Co-authored-by: Jonathan <jonathan@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net>