diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-01-08 15:20:24 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2024-01-15 08:13:40 +0100 |
| commit | 87a76504844905eaec9d3d7b705f5c3b2fa612ae (patch) | |
| tree | 15ff7f4711f3d76ec6c0d66fcf6c6d195f5aaf88 /test/test-manager/src/tests/software.rs | |
| parent | c4157b3d961f71f64eb218c32b5c49ffb33baff1 (diff) | |
| download | mullvadvpn-87a76504844905eaec9d3d7b705f5c3b2fa612ae.tar.xz mullvadvpn-87a76504844905eaec9d3d7b705f5c3b2fa612ae.zip | |
Use type safe Mullvad protobuf client over generated dito
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.
Diffstat (limited to 'test/test-manager/src/tests/software.rs')
| -rw-r--r-- | test/test-manager/src/tests/software.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test-manager/src/tests/software.rs b/test/test-manager/src/tests/software.rs index 1c52f5032f..45b1c73ae1 100644 --- a/test/test-manager/src/tests/software.rs +++ b/test/test-manager/src/tests/software.rs @@ -1,7 +1,7 @@ //! Tests of interoperability with other software use super::{helpers, Error, TestContext}; -use mullvad_management_interface::ManagementServiceClient; +use mullvad_management_interface::MullvadProxyClient; use test_macro::test_function; use test_rpc::{ExecResult, ServiceClient}; @@ -10,7 +10,7 @@ use test_rpc::{ExecResult, ServiceClient}; pub async fn test_containers( _: TestContext, rpc: ServiceClient, - mut mullvad_client: ManagementServiceClient, + mut mullvad_client: MullvadProxyClient, ) -> Result<(), Error> { let result = probe_container_connectivity(&rpc).await?; assert!( |
