Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Mar 10, 2024
1 parent fea9e09 commit f9d16fc
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 1 deletion.
58 changes: 58 additions & 0 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion crates/kitsune-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,22 @@ license.workspace = true
bytes = "1.5.0"
diesel = "2.1.4"
diesel-async = "0.4.1"
env_logger = "0.11.3"
futures-util = "0.3.30"
http = "1.1.0"
http-body-util = "0.1.0"
isolang = "2.4.0"
kitsune-config = { path = "../kitsune-config" }
kitsune-db = { path = "../kitsune-db" }
log = "0.4.21"
multiplex-pool = { path = "../../lib/multiplex-pool" }
pin-project-lite = "0.2.13"
redis = { version = "0.25.0", default-features = false, features = [
"connection-manager",
"tokio-rustls-comp",
] }
scoped-futures = "0.1.3"
testcontainers = "0.15.0"
testcontainers = { version = "0.15.0", features = ["watchdog"] }
testcontainers-modules = { version = "0.3.5", features = [
"minio",
"postgres",
Expand Down
10 changes: 10 additions & 0 deletions crates/kitsune-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ where
F: FnOnce(PgPool) -> Fut,
Fut: Future,
{
let _ = env_logger::builder()
.filter_level(log::LevelFilter::Debug)
.is_test(true)
.try_init();

let resource_handle = get_resource!("DATABASE_URL", self::container::postgres);
let pool = kitsune_db::connect(&DatabaseConfig {
url: resource_handle.url().into(),
Expand Down Expand Up @@ -85,6 +90,11 @@ where
F: FnOnce(multiplex_pool::Pool<ConnectionManager>) -> Fut,
Fut: Future,
{
let _ = env_logger::builder()
.filter_level(log::LevelFilter::Debug)
.is_test(true)
.try_init();

let resource_handle = get_resource!("REDIS_URL", self::container::redis);
let client = redis::Client::open(resource_handle.url().as_ref()).unwrap();
let pool = multiplex_pool::Pool::from_producer(
Expand Down

0 comments on commit f9d16fc

Please sign in to comment.