From 3549bdc3b7c2a74b4c32d46031f3dba09ba4a811 Mon Sep 17 00:00:00 2001 From: Alistair Date: Mon, 23 Sep 2024 15:18:22 +0100 Subject: [PATCH] fix: add some logging --- Cargo.lock | 1 + crates/jstzd/Cargo.toml | 1 + crates/jstzd/tests/dummy.rs | 2 ++ nix/crates.nix | 5 +++-- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b90dd1d0..4dc6e6df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2666,6 +2666,7 @@ dependencies = [ "async-dropper", "async-trait", "bollard", + "env_logger", "futures-util", "tokio", ] diff --git a/crates/jstzd/Cargo.toml b/crates/jstzd/Cargo.toml index b081273b..b9e71478 100644 --- a/crates/jstzd/Cargo.toml +++ b/crates/jstzd/Cargo.toml @@ -12,6 +12,7 @@ async-trait.workspace = true bollard.workspace = true futures-util.workspace = true tokio.workspace = true +env_logger.workspace = true [[bin]] name = "jstzd" diff --git a/crates/jstzd/tests/dummy.rs b/crates/jstzd/tests/dummy.rs index efb6b06a..b429a8ff 100644 --- a/crates/jstzd/tests/dummy.rs +++ b/crates/jstzd/tests/dummy.rs @@ -3,6 +3,8 @@ use jstzd::main; #[tokio::test] async fn test_main() { + env_logger::init(); + let docker = Docker::connect_with_unix( "unix:///var/run/docker.sock", 120, diff --git a/nix/crates.nix b/nix/crates.nix index b3e03c4a..343a2cdd 100644 --- a/nix/crates.nix +++ b/nix/crates.nix @@ -124,6 +124,7 @@ in { // { cargoArtifacts = cargoDeps; + RUST_LOG = "debug"; buildInputs = commonWorkspace.buildInputs ++ [pkgs.docker]; # Run the integration tests # @@ -131,7 +132,7 @@ in { # Don't run the `jstz_api` integration tests until they've been paralellized # # Note: --workspace is required for --exclude. Once --exclude is removed, remove --workspace - cargoNextestExtraArg = "--workspace --test \"*\" --exclude \"jstz_api\""; + cargoNextestExtraArgs = "--workspace --test \"*\" --exclude \"jstz_api\" --no-capture"; }); cargo-llvm-cov = craneLib.cargoLlvmCov (commonWorkspace @@ -139,7 +140,7 @@ in { cargoArtifacts = cargoDeps; buildInputs = commonWorkspace.buildInputs ++ [pkgs.docker]; # Generate coverage reports for codecov - cargoLlvmCovExtraArgs = "--workspace --exclude-from-test \"jstz_api\" --codecov --output-path $out"; + cargoLlvmCovExtraArgs = "--workspace --exclude-from-test \"jstz_api\" --no-capture --codecov --output-path $out"; }); cargo-clippy = craneLib.cargoClippy (commonWorkspace