Skip to content

Commit

Permalink
🐛 fix logging during integration test (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
punkstarman authored Feb 18, 2022
1 parent c4d55ff commit d062ae5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ thiserror = "1.0"

[dev-dependencies]
serde = { version = "1.0", features = ["derive"] }
simple_logger = "1.0"
simple_logger = "2.1"
docmatic = "0.1"
5 changes: 5 additions & 0 deletions tests/common/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use simple_logger::SimpleLogger;

pub fn init_logger() {
let _ = SimpleLogger::new().with_utc_timestamps().init();
}
8 changes: 3 additions & 5 deletions tests/failures.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
mod common;

use common::init_logger;
use log::info;
use serde::Deserialize;
use serde_xml_rs::from_str;
use simple_logger::SimpleLogger;

fn init_logger() {
let _ = SimpleLogger::new().init();
}

#[derive(Debug, Deserialize, PartialEq)]
struct Item {
Expand Down
9 changes: 3 additions & 6 deletions tests/migrated.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
use simple_logger::SimpleLogger;
use std::fmt::Debug;
mod common;

use common::init_logger;
use serde::{de, ser, Deserialize, Serialize};
use serde_xml_rs::{from_str, Error};

fn init_logger() {
let _ = SimpleLogger::new().init();
}
use std::fmt::Debug;

#[derive(PartialEq, Debug, Serialize, Deserialize)]
enum Animal {
Expand Down
8 changes: 3 additions & 5 deletions tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
mod common;

use common::init_logger;
use serde::Deserialize;
use serde_xml_rs::{from_str, Deserializer};
use simple_logger::SimpleLogger;

fn init_logger() {
let _ = SimpleLogger::new().init();
}

#[derive(Debug, Deserialize, PartialEq)]
struct Item {
Expand Down

0 comments on commit d062ae5

Please sign in to comment.