diff --git a/services/commtest/tests/backup/add_attachments.rs b/services/commtest/src/backup/add_attachments.rs rename from services/commtest/tests/backup/add_attachments.rs rename to services/commtest/src/backup/add_attachments.rs diff --git a/services/commtest/tests/backup/backup_utils.rs b/services/commtest/src/backup/backup_utils.rs rename from services/commtest/tests/backup/backup_utils.rs rename to services/commtest/src/backup/backup_utils.rs diff --git a/services/commtest/tests/backup/create_new_backup.rs b/services/commtest/src/backup/create_new_backup.rs rename from services/commtest/tests/backup/create_new_backup.rs rename to services/commtest/src/backup/create_new_backup.rs diff --git a/services/commtest/tests/backup/mod.rs b/services/commtest/src/backup/mod.rs rename from services/commtest/tests/backup/mod.rs rename to services/commtest/src/backup/mod.rs diff --git a/services/commtest/tests/backup/pull_backup.rs b/services/commtest/src/backup/pull_backup.rs rename from services/commtest/tests/backup/pull_backup.rs rename to services/commtest/src/backup/pull_backup.rs diff --git a/services/commtest/tests/backup/send_log.rs b/services/commtest/src/backup/send_log.rs rename from services/commtest/tests/backup/send_log.rs rename to services/commtest/src/backup/send_log.rs diff --git a/services/commtest/tests/blob/blob_utils.rs b/services/commtest/src/blob/blob_utils.rs rename from services/commtest/tests/blob/blob_utils.rs rename to services/commtest/src/blob/blob_utils.rs diff --git a/services/commtest/tests/blob/get.rs b/services/commtest/src/blob/get.rs rename from services/commtest/tests/blob/get.rs rename to services/commtest/src/blob/get.rs diff --git a/services/commtest/tests/blob/mod.rs b/services/commtest/src/blob/mod.rs rename from services/commtest/tests/blob/mod.rs rename to services/commtest/src/blob/mod.rs diff --git a/services/commtest/tests/blob/put.rs b/services/commtest/src/blob/put.rs rename from services/commtest/tests/blob/put.rs rename to services/commtest/src/blob/put.rs diff --git a/services/commtest/tests/blob/remove.rs b/services/commtest/src/blob/remove.rs rename from services/commtest/tests/blob/remove.rs rename to services/commtest/src/blob/remove.rs diff --git a/services/commtest/src/lib.rs b/services/commtest/src/lib.rs new file mode 100644 --- /dev/null +++ b/services/commtest/src/lib.rs @@ -0,0 +1,3 @@ +pub mod backup; +pub mod blob; +pub mod tools; diff --git a/services/commtest/src/main.rs b/services/commtest/src/main.rs deleted file mode 100644 --- a/services/commtest/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - unimplemented!(); -} diff --git a/services/commtest/tests/tools/mod.rs b/services/commtest/src/tools.rs rename from services/commtest/tests/tools/mod.rs rename to services/commtest/src/tools.rs --- a/services/commtest/tests/tools/mod.rs +++ b/services/commtest/src/tools.rs @@ -1,5 +1,3 @@ -#![allow(dead_code)] - use bytesize::ByteSize; use hex::ToHex; use lazy_static::lazy_static; diff --git a/services/commtest/tests/backup_integration_test.rs b/services/commtest/tests/backup_integration_test.rs --- a/services/commtest/tests/backup_integration_test.rs +++ b/services/commtest/tests/backup_integration_test.rs @@ -1,15 +1,12 @@ -mod backup; -mod tools; - -use backup::{ +use bytesize::ByteSize; +use commtest::backup::{ add_attachments, backup_utils::{self, BackupData, BackupServiceClient, Item}, create_new_backup, pull_backup, send_log, }; -use bytesize::ByteSize; +use commtest::tools::{self, Error}; use std::collections::HashMap; use std::env; -use tools::Error; #[tokio::test] async fn backup_integration_test() -> Result<(), Error> { diff --git a/services/commtest/tests/backup_performance_test.rs b/services/commtest/tests/backup_performance_test.rs --- a/services/commtest/tests/backup_performance_test.rs +++ b/services/commtest/tests/backup_performance_test.rs @@ -1,16 +1,13 @@ -mod backup; -mod tools; - -use backup::{ +use bytesize::ByteSize; +use commtest::backup::{ add_attachments, backup_utils::{self, BackupData, BackupServiceClient, Item}, create_new_backup, pull_backup, send_log, }; -use bytesize::ByteSize; +use commtest::tools::{obtain_number_of_threads, Error}; use std::env; use std::sync::mpsc::channel; use tokio::runtime::Runtime; -use tools::{obtain_number_of_threads, Error}; #[tokio::test] async fn backup_performance_test() -> Result<(), Error> { diff --git a/services/commtest/tests/blob_integration_test.rs b/services/commtest/tests/blob_integration_test.rs --- a/services/commtest/tests/blob_integration_test.rs +++ b/services/commtest/tests/blob_integration_test.rs @@ -1,13 +1,10 @@ -mod blob; -mod tools; - -use blob::{ +use bytesize::ByteSize; +use commtest::blob::{ blob_utils::{BlobData, BlobServiceClient}, get, put, remove, }; -use bytesize::ByteSize; +use commtest::tools::{self, Error}; use std::env; -use tools::Error; #[tokio::test] async fn blob_integration_test() -> Result<(), Error> { diff --git a/services/commtest/tests/blob_performance_test.rs b/services/commtest/tests/blob_performance_test.rs --- a/services/commtest/tests/blob_performance_test.rs +++ b/services/commtest/tests/blob_performance_test.rs @@ -1,14 +1,11 @@ -mod blob; -mod tools; - -use blob::{ +use bytesize::ByteSize; +use commtest::blob::{ blob_utils::{BlobData, BlobServiceClient}, get, put, remove, }; -use bytesize::ByteSize; +use commtest::tools::{obtain_number_of_threads, Error}; use std::env; use tokio::runtime::Runtime; -use tools::{obtain_number_of_threads, Error}; #[tokio::test] async fn blob_performance_test() -> Result<(), Error> { diff --git a/services/commtest/tests/tunnelbroker_integration_test.rs b/services/commtest/tests/tunnelbroker_integration_test.rs --- a/services/commtest/tests/tunnelbroker_integration_test.rs +++ b/services/commtest/tests/tunnelbroker_integration_test.rs @@ -1,5 +1,3 @@ -mod tools; - #[tokio::test] async fn tunnelbroker_integration_test() { assert!(false, "not implemented");