Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions postgres/lib/testcontainers/postgres.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def with_password(password)

def _configure
add_env("POSTGRES_DATABASE", @database)
add_env("POSTGRES_DB", @database)
add_env("POSTGRES_USER", @username)

raise ContainerLaunchException, "Password is required for non-root users" if @password.nil? || @password.empty?
Expand Down
1 change: 1 addition & 0 deletions postgres/test/postgres_container_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def test_it_returns_the_default_port

def test_it_is_configured_with_the_default_environment_variables
assert "test", @container.get_env("POSTGRES_DATABASE")
assert "test", @container.get_env("POSTGRES_DB")
assert "test", @container.get_env("POSTGRES_USER")
assert "test", @container.get_env("POSTGRES_PASSWORD")
assert "test", @container.get_env("POSTGRES_ROOT_PASSWORD")
Expand Down
Loading