-
-
Notifications
You must be signed in to change notification settings - Fork 251
Closed
Description
Expected Behaviour
I would expect that
const postgresContainer = await new PostgreSqlContainer()
.withReuse()
.withExposedPorts({
container: 5432,
host: 54321,
})
.start()
leads to postgresContainer.getPort() to always return 54321
Actual Behaviour
postgresContainer.getPort() actually returns a randomly allocated port each time.
The automatic setting of an available port is nice, but it would be great if the withExposedPorts example given here actually worked as advertised for the postgres container. Yes, it's not recommended, but it can still be useful if you want to inspect your database at a known port after a failed test.
Metadata
Metadata
Assignees
Labels
No labels