From bf025b4977543a371df9dbdddfe9cc2f02f2a8d0 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sun, 9 Feb 2025 23:56:38 +0100 Subject: First integration test Sets up a whole slew of docker instances, all started from clean slate for test. --- server/src/main.rs | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'server/src/main.rs') diff --git a/server/src/main.rs b/server/src/main.rs index f07c372..9bdfeaf 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -14,6 +14,7 @@ use std::path::PathBuf; use utoipa::OpenApi; use utoipa_swagger_ui::SwaggerUi; +use eyeballs_api::api_model; use eyeballs_common::fs_utils; use eyeballs_common::git; use eyeballs_common::git_socket; @@ -21,7 +22,6 @@ use eyeballs_common::git_socket; #[cfg(test)] mod tests; -mod api_model; mod auth; mod authorized_keys; mod db_utils; @@ -58,29 +58,6 @@ struct Db(sqlx::MySqlPool); )] pub struct MainApi; -impl TryFrom for api_model::UserReviewRole { - type Error = &'static str; - - fn try_from(value: u8) -> Result { - match value { - 0 => Ok(api_model::UserReviewRole::None), - 1 => Ok(api_model::UserReviewRole::Reviewer), - 2 => Ok(api_model::UserReviewRole::Watcher), - _ => Err("Invalid role"), - } - } -} - -impl From for u8 { - fn from(value: api_model::UserReviewRole) -> u8 { - match value { - api_model::UserReviewRole::None => 0, - api_model::UserReviewRole::Reviewer => 1, - api_model::UserReviewRole::Watcher => 2, - } - } -} - #[utoipa::path( responses( (status = 200, description = "Get all projects", body = api_model::Projects), -- cgit v1.2.3-70-g09d2