Refactor the integration test suite
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
pub mod test_helper;
|
||||
use crate::helpers::app_address;
|
||||
use rstest::*;
|
||||
use test_helper::app_address;
|
||||
|
||||
#[rstest]
|
||||
#[tokio::test]
|
||||
@@ -2,7 +2,6 @@ use contextswitch_api::contextswitch::taskwarrior;
|
||||
use contextswitch_api::observability::{get_subscriber, init_subscriber};
|
||||
use mktemp::Temp;
|
||||
use rstest::*;
|
||||
use std::fs;
|
||||
use std::net::TcpListener;
|
||||
use tracing::info;
|
||||
|
||||
@@ -31,10 +30,6 @@ fn setup_taskwarrior() -> String {
|
||||
task_data_location
|
||||
}
|
||||
|
||||
pub fn clear_tasks(task_data_location: String) {
|
||||
fs::remove_dir_all(task_data_location).unwrap();
|
||||
}
|
||||
|
||||
#[fixture]
|
||||
#[once]
|
||||
pub fn app_address() -> String {
|
||||
3
tests/api/main.rs
Normal file
3
tests/api/main.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
mod health_check;
|
||||
mod helpers;
|
||||
mod task;
|
||||
@@ -1,10 +1,8 @@
|
||||
pub mod test_helper;
|
||||
|
||||
use crate::helpers::app_address;
|
||||
use contextswitch_api::contextswitch;
|
||||
use contextswitch_types::{Bookmark, ContextswitchData, NewTask, Task, TaskId};
|
||||
use http::uri::Uri;
|
||||
use rstest::*;
|
||||
use test_helper::app_address;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[rstest]
|
||||
Reference in New Issue
Block a user