Replies: 1 comment
-
Hi, I've moved it to a discussion because it is clearly not a bug. In order to help, would you mind sharing a project that reproduce it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Module
PostgreSQL
Testcontainers version
Junit-Jupiter 1.20.4 and PostgreSQL 1.20.0
Using the latest Testcontainers version?
Yes
Host OS
macOS, Windows
Host Arch
x86, arm
Docker version
Client: Version: 27.3.1 API version: 1.47 Go version: go1.22.7 Git commit: ce12230 Built: Fri Sep 20 11:38:18 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.36.0 (175267) Engine: Version: 27.3.1 API version: 1.47 (minimum version 1.24) Go version: go1.22.7 Git commit: 41ca978 Built: Fri Sep 20 11:41:19 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.7.21 GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111 runc: Version: 1.1.13 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
What happened?
I am currently trying out setting up our tests with a Postgres test container. For that I have created a PostgreSQLContainer like that:
The
schema.sql
file contains the schema required to run the tests.Furthermore I have created a
@BeforAll
method to start the Postgres container and setup theHikariConfig
:Looking at the container logs it appears that the
schema.sql
file is executed:Creating a breakpoint and looking at the database with IntelliJ also shows the created tables.
However as soon as I try to query the database it throws the following error:
Relevant log output
Additional Information
While manually creating the schema in the
@BeforeAll
method works I would really like to know why exactly it is not possible like the way provided above.Beta Was this translation helpful? Give feedback.
All reactions