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.
This commit is contained in:
Valentin Tolmer 2023-05-02 15:58:34 +02:00 committed by nitnelave
parent 852e1586e7
commit ab9ee8d962

View file

@ -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())