diff --git a/justfile b/justfile index 008089f2..6a357186 100644 --- a/justfile +++ b/justfile @@ -5,7 +5,7 @@ export JUST_ROOT := justfile_directory() run: @echo '==> Running notify server' - cargo run + ANSI_LOGS=true cargo run test ENV: @echo '==> Running integration tests' diff --git a/src/main.rs b/src/main.rs index b0dd069f..6bd83ab1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,7 +15,7 @@ async fn main() -> Result<()> { tracing_subscriber::fmt() .with_max_level(tracing::Level::from_str(&config.log_level).expect("Invalid log level")) .with_span_events(FmtSpan::CLOSE) - .with_ansi(true) + .with_ansi(std::env::var("ANSI_LOGS").is_ok()) .init(); notify_server::bootstap(shutdown, config).await diff --git a/src/state.rs b/src/state.rs index 10511111..da307e49 100644 --- a/src/state.rs +++ b/src/state.rs @@ -92,6 +92,7 @@ impl AppState { topic: topic.clone(), project_id: project_id.to_string(), account: client_data.id.clone(), + expiry: client_data.expiry, }, ReplaceOptions::builder().upsert(true).build(), ) diff --git a/src/types.rs b/src/types.rs index dca74898..9ca08453 100644 --- a/src/types.rs +++ b/src/types.rs @@ -43,6 +43,7 @@ pub struct LookupEntry { pub topic: String, pub project_id: String, pub account: String, + pub expiry: u64, } #[derive(Debug)] diff --git a/tests/integration.rs b/tests/integration.rs index 66a4254b..c2abcafd 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -46,7 +46,7 @@ fn urls(env: String) -> (String, String) { } } -const TEST_ACCOUNT: &'static str = "eip155:123:test_account"; +const TEST_ACCOUNT: &'static str = "eip155:123:123456789abcdef"; #[tokio::test] async fn notify_properly_sending_message() {