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 rstest::*;
|
||||||
use test_helper::app_address;
|
|
||||||
|
|
||||||
#[rstest]
|
#[rstest]
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
@@ -2,7 +2,6 @@ use contextswitch_api::contextswitch::taskwarrior;
|
|||||||
use contextswitch_api::observability::{get_subscriber, init_subscriber};
|
use contextswitch_api::observability::{get_subscriber, init_subscriber};
|
||||||
use mktemp::Temp;
|
use mktemp::Temp;
|
||||||
use rstest::*;
|
use rstest::*;
|
||||||
use std::fs;
|
|
||||||
use std::net::TcpListener;
|
use std::net::TcpListener;
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
|
|
||||||
@@ -31,10 +30,6 @@ fn setup_taskwarrior() -> String {
|
|||||||
task_data_location
|
task_data_location
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clear_tasks(task_data_location: String) {
|
|
||||||
fs::remove_dir_all(task_data_location).unwrap();
|
|
||||||
}
|
|
||||||
|
|
||||||
#[fixture]
|
#[fixture]
|
||||||
#[once]
|
#[once]
|
||||||
pub fn app_address() -> String {
|
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_api::contextswitch;
|
||||||
use contextswitch_types::{Bookmark, ContextswitchData, NewTask, Task, TaskId};
|
use contextswitch_types::{Bookmark, ContextswitchData, NewTask, Task, TaskId};
|
||||||
use http::uri::Uri;
|
use http::uri::Uri;
|
||||||
use rstest::*;
|
use rstest::*;
|
||||||
use test_helper::app_address;
|
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
#[rstest]
|
#[rstest]
|
||||||
Reference in New Issue
Block a user