From ab9ee8d9622c5fc6af76ceb05fc775f6743b4fa2 Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Tue, 2 May 2023 15:58:34 +0200 Subject: [PATCH] tests: allow dead code in common module We're running afoul of https://github.com/rust-lang/rust/issues/46379, where each test is compiled independently, so any test that doesn't use every helper method triggers a dead code warning. --- server/tests/common/env.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/tests/common/env.rs b/server/tests/common/env.rs index b77af1e..45f7833 100644 --- a/server/tests/common/env.rs +++ b/server/tests/common/env.rs @@ -1,3 +1,4 @@ +#![allow(dead_code)] use std::env::var; pub const DB_KEY: &str = "LLDAP_DATABASE_URL"; @@ -7,7 +8,6 @@ pub fn database_url() -> String { url.unwrap_or("sqlite://e2e_test.db?mode=rwc".to_string()) } -#[cfg(test)] pub fn ldap_url() -> String { let port = var("LLDAP_LDAP_PORT").ok(); let port = port.unwrap_or("3890".to_string()); @@ -30,7 +30,6 @@ pub fn admin_password() -> String { pass.unwrap_or("password".to_string()) } -#[cfg(test)] pub fn base_dn() -> String { let dn = var("LLDAP_LDAP_BASE_DN").ok(); dn.unwrap_or("dc=example,dc=com".to_string())