Skip to content

Commit

Permalink
chore: use different db-name in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ngutech21 committed Feb 28, 2024
1 parent 2bbff90 commit 1d43bfa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions integrationtests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use tokio::time::{sleep_until, Instant};
pub fn test_integration() -> anyhow::Result<()> {
use mokshamint::config::{DatabaseConfig, ServerConfig};

// create postgres container that will be destroyed after the test is done
let docker = clients::Cli::default();
let node = docker.run(Postgres::default());
let host_port = node.get_host_port_ipv4(5432);
Expand All @@ -40,7 +41,7 @@ pub fn test_integration() -> anyhow::Result<()> {
rt.block_on(async {
let db_config = DatabaseConfig {
db_url: format!(
"postgres://postgres:postgres@localhost:{}/moksha-mint",
"postgres://postgres:postgres@localhost:{}/test-db",
host_port
),
};
Expand Down Expand Up @@ -174,7 +175,7 @@ impl Default for Postgres {
let mut env_vars = HashMap::new();
env_vars.insert("POSTGRES_DB".to_owned(), "postgres".to_owned());
env_vars.insert("POSTGRES_HOST_AUTH_METHOD".into(), "trust".into());
env_vars.insert("POSTGRES_DB".into(), "moksha-mint".into());
env_vars.insert("POSTGRES_DB".into(), "test-db".into());

Self { env_vars }
}
Expand Down

0 comments on commit 1d43bfa

Please sign in to comment.