Skip to content

Postgres fails when image-name is specified #866

@eahrold

Description

@eahrold

Expected Behavior

test-resources.containers.postgres.image-name=postgres:17.4

should use the image by name and inject the necessary configuration values back into test


Side note, using the "latest" tag works fine

test-resources.containers.postgres.image-name=postgres:latest

Actual Behaviour

It breaks as though the configuration is not getting propagated back

Bean definition [io.micronaut.data.jdbc.config.SchemaGenerator] could not be loaded: Error instantiating bean of type  [javax.sql.DataSource]

Message: Test resources service wasn't able to revolve expression 'datasources.default.password': java.net.http.HttpTimeoutException: request timed out
Path Taken:
@i.m.c.a.Context j.s.DataSource i.m.c.j.h.DatasourceFactory.dataSource#dataSource(DatasourceConfiguration datasourceConfiguration)
\---> @i.m.c.a.Context j.s.DataSource i.m.c.j.h.DatasourceFactory.dataSource#dataSource([DatasourceConfiguration datasourceConfiguration])
io.micronaut.context.exceptions.BeanInstantiationException: Bean definition [io.micronaut.data.jdbc.config.SchemaGenerator] could not be loaded: Error instantiating bean of type  [javax.sql.DataSource]

Message: Test resources service wasn't able to revolve expression 'datasources.default.password': java.net.http.HttpTimeoutException: request timed out
Path Taken:

Steps To Reproduce

Setup a basic repo from micronaut launch with jdbc, data, and postgres, and test resources

create a model, repository,
specify a different image-name for postgres.

Environment Information

macos
tem-21

Example Application

https://github.com/eahrold/broken-pg-test-resources

Version

4.8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions