Skip to content

Commit

Permalink
Remove test-log crate & use dbg! macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmwaikar committed Jan 13, 2025
1 parent f5effe4 commit 534675e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 52 deletions.
44 changes: 0 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ build-data = "0.2.1"

[dev-dependencies]
pretty_assertions = "1.4.1"
test-log = { version = "0.2.16", features = ["trace"] }
12 changes: 5 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ async fn fetch_data(input_fhir_server: &FhirServer, output_fhir_server: &FhirSer
mod tests {
use pretty_assertions::assert_eq;
use reqwest::StatusCode;
use tracing::debug;
use test_log::test;

use crate::data_access::models::DataRequest;

Expand All @@ -149,7 +147,7 @@ mod tests {
assert_eq!(response.status(), StatusCode::OK);

let data_requests = response.json::<Vec<DataRequest>>().await.unwrap();
debug!("number of rows in data_requests table: {}", data_requests.len());
dbg!("number of rows in data_requests table: {}", data_requests.len());
data_requests
}

Expand All @@ -160,10 +158,10 @@ mod tests {
// ../docs/examples/data_request.json file, so this test is fine.
// Even if we find a single row in the data_requests table, it is
// for this one single patient only.
debug!("a data request for this patient already exists, returning the saved one");
dbg!("a data request for this patient already exists, returning the saved one");
data_requests[0].clone()
} else {
debug!("creating a new data request");
dbg!("creating a new data request");
let bytes = include_bytes!("../docs/examples/data_request.json");
let json = &serde_json::from_slice::<serde_json::Value>(bytes).unwrap();

Expand All @@ -178,10 +176,10 @@ mod tests {
}
}

#[test(tokio::test)]
#[tokio::test]
async fn get_data_request() {
let data_request = post_data_request().await;
debug!("data request id: {}", data_request.id);
dbg!("data request id: {}", data_request.id.clone());

let url = format!("{BASE_API_URL}/{}", data_request.id);

Expand Down

0 comments on commit 534675e

Please sign in to comment.