View Source Testcontainers.Container.PostgresContainer (testcontainers v0.9.1)

Functions to build and interact with PostgreSql containers.

Summary

Functions

Returns the connection parameters to connect to the database from the host machine.

Builds a PostgreSql container.

Returns the port on the host machine where the MySql container is listening.

Functions

Link to this function

connection_parameters(container)

View Source

Returns the connection parameters to connect to the database from the host machine.

Link to this function

new(image \\ "postgres:13.1", opts \\ [])

View Source

Builds a PostgreSql container.

Uses PostgreSql 13.1 by default, but a custom image can also be set.

Options

  • username sets the username for the user
  • password sets the password for the user
  • database sets the name of the database

Returns the port on the host machine where the MySql container is listening.