diff options
| author | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-12 20:45:27 +0530 |
|---|---|---|
| committer | Kunal Mohan <kunalmohan99@gmail.com> | 2021-05-15 22:14:34 +0530 |
| commit | e203f96d78865f3710061934c82cca1e5dd78fa9 (patch) | |
| tree | c5c8c8c67da7e8cdebcdf971c942703996fb4255 /src/tests/mod.rs | |
| parent | Use ClientToServerMsg and ServerToClientMsg for IPC (diff) | |
| download | sl0ppij-e203f96d78865f3710061934c82cca1e5dd78fa9.tar.gz sl0ppij-e203f96d78865f3710061934c82cca1e5dd78fa9.tar.xz sl0ppij-e203f96d78865f3710061934c82cca1e5dd78fa9.zip | |
fix testing
Diffstat (limited to 'src/tests/mod.rs')
| -rw-r--r-- | src/tests/mod.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 6e07c96d..7aaad79f 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -3,3 +3,26 @@ pub mod integration; pub mod possible_tty_inputs; pub mod tty_inputs; pub mod utils; + +use crate::cli::CliArgs; +use crate::client::start_client; +use crate::common::input::config::Config; +use crate::os_input_output::{ClientOsApi, ServerOsApi}; +use crate::server::start_server; +use std::path::PathBuf; + +pub fn start( + client_os_input: Box<dyn ClientOsApi>, + opts: CliArgs, + server_os_input: Box<dyn ServerOsApi>, + config: Config, +) { + let server_thread = std::thread::Builder::new() + .name("server_thread".into()) + .spawn(move || { + start_server(server_os_input, PathBuf::from("")); + }) + .unwrap(); + start_client(client_os_input, opts, config); + let _ = server_thread.join(); +} |
