Polish "Fix handling of env vars in Bitnami's Postgres image"

See gh-43783
This commit is contained in:
Andy Wilkinson
2025-01-14 19:19:54 +00:00
parent c8f2fb0d94
commit d4f497d90d
5 changed files with 56 additions and 28 deletions

View File

@@ -67,13 +67,6 @@ class PostgresEnvironmentTests {
assertThat(environment.getUsername()).isEqualTo("me");
}
@Test
void getUsernameWhenHasPostgresUsername() {
PostgresEnvironment environment = new PostgresEnvironment(
Map.of("POSTGRES_USERNAME", "me", "POSTGRESQL_PASSWORD", "secret"));
assertThat(environment.getUsername()).isEqualTo("me");
}
@Test
void getUsernameWhenHasPostgresqlUsername() {
PostgresEnvironment environment = new PostgresEnvironment(
@@ -134,9 +127,9 @@ class PostgresEnvironmentTests {
}
@Test
void getDatabaseWhenHasPostgresDatabase() {
void getDatabaseWhenHasPostgresqlDb() {
PostgresEnvironment environment = new PostgresEnvironment(
Map.of("POSTGRES_DATABASE", "db", "POSTGRESQL_PASSWORD", "secret"));
Map.of("POSTGRESQL_DB", "db", "POSTGRESQL_PASSWORD", "secret"));
assertThat(environment.getDatabase()).isEqualTo("db");
}