Add support for empty password in bitnami/postgresql

See gh-43771

Signed-off-by: He Zean <realhezean@gmail.com>
This commit is contained in:
He Zean
2025-01-10 20:51:58 +08:00
committed by Andy Wilkinson
parent 21161bc42e
commit 2f178188d1
5 changed files with 42 additions and 2 deletions

View File

@@ -93,6 +93,12 @@ class PostgresEnvironmentTests {
assertThat(environment.getPassword()).isNull();
}
@Test
void getPasswordWhenHasNoPasswordAndAllowEmptyPassword() {
PostgresEnvironment environment = new PostgresEnvironment(Map.of("ALLOW_EMPTY_PASSWORD", "yes"));
assertThat(environment.getPassword()).isEmpty();
}
@Test
void getDatabaseWhenNoPostgresDbOrPostgresUser() {
PostgresEnvironment environment = new PostgresEnvironment(Map.of("POSTGRES_PASSWORD", "secret"));