diff options
| author | Markus Pettersson <markus.pettersson@mullvad.net> | 2023-11-17 15:37:13 +0100 |
|---|---|---|
| committer | Markus Pettersson <markus.pettersson@mullvad.net> | 2023-12-06 14:37:06 +0100 |
| commit | 1b930b893fa3fcb06f5fee4affbfb62887d0e68a (patch) | |
| tree | 21b0836c5b5730f844950a2764aa652832f13849 /test/test-rpc/src/lib.rs | |
| parent | ac3e222d031b0f599561c4c30504de5cd3f871a2 (diff) | |
| download | mullvadvpn-1b930b893fa3fcb06f5fee4affbfb62887d0e68a.tar.xz mullvadvpn-1b930b893fa3fcb06f5fee4affbfb62887d0e68a.zip | |
Implement RPC for reading & writing to app cache file
- 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
Diffstat (limited to 'test/test-rpc/src/lib.rs')
| -rw-r--r-- | test/test-rpc/src/lib.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test-rpc/src/lib.rs b/test/test-rpc/src/lib.rs index 6968a3c613..65ccb2fb7a 100644 --- a/test/test-rpc/src/lib.rs +++ b/test/test-rpc/src/lib.rs @@ -120,6 +120,8 @@ mod service { /// Returns all Mullvad app files, directories, and other data found on the system. async fn find_mullvad_app_traces() -> Result<Vec<AppTrace>, Error>; + async fn get_mullvad_app_cache_dir() -> Result<PathBuf, Error>; + /// Send TCP packet async fn send_tcp( interface: Option<String>, @@ -149,6 +151,15 @@ mod service { /// Perform DNS resolution. async fn resolve_hostname(hostname: String) -> Result<Vec<SocketAddr>, Error>; + /// Restart the Mullvad VPN application. + async fn restart_app() -> Result<(), Error>; + + /// Stop the Mullvad VPN application. + async fn stop_app() -> Result<(), Error>; + + /// Start the Mullvad VPN application. + async fn start_app() -> Result<(), Error>; + /// Sets the log level of the daemon service, the verbosity level represents the number of /// `-v`s passed on the command line. This will restart the daemon system service. async fn set_daemon_log_level( @@ -161,6 +172,9 @@ mod service { /// Copy a file from `src` to `dest` on the test runner. async fn copy_file(src: String, dest: String) -> Result<(), Error>; + /// Write arbitrary bytes to some file `dest` on the test runner. + async fn write_file(dest: String, bytes: Vec<u8>) -> Result<(), Error>; + async fn reboot() -> Result<(), Error>; async fn set_mullvad_daemon_service_state(on: bool) -> Result<(), Error>; |
