From 361f08ba0a206dfdcb8c485810d4be0531a4420a Mon Sep 17 00:00:00 2001 From: Artem Medvedev Date: Wed, 25 Sep 2024 19:32:23 +0200 Subject: [PATCH] test(mssql): correct password usage --- examples/mssql_server.rs | 2 +- src/mssql_server/mod.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/mssql_server.rs b/examples/mssql_server.rs index 491b94d..5ee3005 100644 --- a/examples/mssql_server.rs +++ b/examples/mssql_server.rs @@ -13,7 +13,7 @@ async fn main() -> Result<(), Box> { config.port(container.get_host_port_ipv4(1433).await?); config.authentication(tiberius::AuthMethod::sql_server( "sa", - "yourStrong(!)Password", + MssqlServer::DEFAULT_SA_PASSWORD, )); config.trust_cert(); diff --git a/src/mssql_server/mod.rs b/src/mssql_server/mod.rs index 9d3b22b..3824a24 100644 --- a/src/mssql_server/mod.rs +++ b/src/mssql_server/mod.rs @@ -118,7 +118,7 @@ impl Image for MssqlServer { mod tests { use std::error; - use testcontainers::{runners::AsyncRunner, ImageExt}; + use testcontainers::runners::AsyncRunner; use tiberius::{AuthMethod, Client, Config}; use tokio::net::TcpStream; use tokio_util::compat::{Compat, TokioAsyncWriteCompatExt}; @@ -131,7 +131,7 @@ mod tests { let config = new_config( container.get_host().await?, container.get_host_port_ipv4(1433).await?, - "Strong@Passw0rd", + MssqlServer::DEFAULT_SA_PASSWORD, ); let mut client = get_mssql_client(config).await?; @@ -152,7 +152,7 @@ mod tests { let config = new_config( container.get_host().await?, container.get_host_port_ipv4(1433).await?, - MssqlServer::DEFAULT_SA_PASSWORD, + "yourStrongPassword123!", ); let mut client = get_mssql_client(config).await?;