Fails
PS C:\_code\testcontainers-go\modules\postgres> go test -v
=== RUN TestPostgres
=== RUN TestPostgres/Postgres
2023/11/22 22:10:13 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:13 β
Container created: 68f51bbccb36
2023/11/22 22:10:13 π³ Starting container: 68f51bbccb36
2023/11/22 22:10:14 β
Container started: 68f51bbccb36
2023/11/22 22:10:14 π§ Waiting for container id 68f51bbccb36 image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:14 failed accessing container logs: Error response from daemon: No such container: 68f51bbccb3615d612b63548321b08e14a42c098cc3f4a330c9cd284ddd846d7
postgres_test.go:65: Error response from daemon: No such container: 68f51bbccb3615d612b63548321b08e14a42c098cc3f4a330c9cd284ddd846d7: could not start container: creating reaper failed: failed to create container
=== RUN TestPostgres/Timescale
2023/11/22 22:10:14 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:15 β
Container created: aa9e2ceac893
2023/11/22 22:10:15 π³ Starting container: aa9e2ceac893
2023/11/22 22:10:15 β
Container started: aa9e2ceac893
2023/11/22 22:10:15 π§ Waiting for container id aa9e2ceac893 image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:15 failed accessing container logs: Error response from daemon: No such container: aa9e2ceac8935368dac258fa957d90cdb966b820e0a38056f7e0e049c83db7d3
postgres_test.go:65: Error response from daemon: No such container: aa9e2ceac8935368dac258fa957d90cdb966b820e0a38056f7e0e049c83db7d3: could not start container: creating reaper failed: failed to create container
=== RUN TestPostgres/Postgis
2023/11/22 22:10:15 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:16 β
Container created: 6e24665dbe51
2023/11/22 22:10:16 π³ Starting container: 6e24665dbe51
2023/11/22 22:10:16 β
Container started: 6e24665dbe51
2023/11/22 22:10:16 π§ Waiting for container id 6e24665dbe51 image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:16 failed accessing container logs: Error response from daemon: No such container: 6e24665dbe513d1632cf693f1e5efea4d4ab1cacc61fbb147239313ba7d1a81a
postgres_test.go:65: Error response from daemon: No such container: 6e24665dbe513d1632cf693f1e5efea4d4ab1cacc61fbb147239313ba7d1a81a: could not start container: creating reaper failed: failed to create container
--- FAIL: TestPostgres (3.21s)
--- FAIL: TestPostgres/Postgres (1.09s)
--- FAIL: TestPostgres/Timescale (1.09s)
--- FAIL: TestPostgres/Postgis (1.03s)
=== RUN TestContainerWithWaitForSQL
=== RUN TestContainerWithWaitForSQL/default_query
2023/11/22 22:10:17 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:17 β
Container created: 4e1c8c1ffcaa
2023/11/22 22:10:17 π³ Starting container: 4e1c8c1ffcaa
2023/11/22 22:10:17 β
Container started: 4e1c8c1ffcaa
2023/11/22 22:10:17 π§ Waiting for container id 4e1c8c1ffcaa image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:18 failed accessing container logs: Error response from daemon: No such container: 4e1c8c1ffcaab3bafdda6aef2c13c03720ec1afef96132c5fea06964b5d423e2
postgres_test.go:119:
Error Trace: C:/_code/testcontainers-go/modules/postgres/postgres_test.go:119
Error: Received unexpected error:
Error response from daemon: No such container: 4e1c8c1ffcaab3bafdda6aef2c13c03720ec1afef96132c5fea06964b5d423e2: could not start container: creating reaper failed: failed to create container
Test: TestContainerWithWaitForSQL/default_query
=== RUN TestContainerWithWaitForSQL/custom_query
2023/11/22 22:10:18 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:18 β
Container created: f615881b8a11
2023/11/22 22:10:18 π³ Starting container: f615881b8a11
2023/11/22 22:10:18 β
Container started: f615881b8a11
2023/11/22 22:10:18 π§ Waiting for container id f615881b8a11 image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:19 failed accessing container logs: Error response from daemon: No such container: f615881b8a11780616c66544b8d26ff262e2eda6205c9e4b100517a68c498f03
postgres_test.go:130:
Error Trace: C:/_code/testcontainers-go/modules/postgres/postgres_test.go:130
Error: Received unexpected error:
Error response from daemon: No such container: f615881b8a11780616c66544b8d26ff262e2eda6205c9e4b100517a68c498f03: could not start container: creating reaper failed: failed to create container
Test: TestContainerWithWaitForSQL/custom_query
=== RUN TestContainerWithWaitForSQL/custom_bad_query
2023/11/22 22:10:19 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:19 β
Container created: 5d8c3d63933f
2023/11/22 22:10:19 π³ Starting container: 5d8c3d63933f
2023/11/22 22:10:19 β
Container started: 5d8c3d63933f
2023/11/22 22:10:19 π§ Waiting for container id 5d8c3d63933f image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:20 failed accessing container logs: Error response from daemon: No such container: 5d8c3d63933fff5c92910810a0eb9931243c6cb7d912b511dfa6d9d893d1d88f
--- FAIL: TestContainerWithWaitForSQL (3.32s)
--- FAIL: TestContainerWithWaitForSQL/default_query (1.12s)
--- FAIL: TestContainerWithWaitForSQL/custom_query (1.04s)
--- PASS: TestContainerWithWaitForSQL/custom_bad_query (1.15s)
=== RUN TestWithConfigFile
2023/11/22 22:10:20 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:20 β
Container created: e4f6d79a688a
2023/11/22 22:10:20 π³ Starting container: e4f6d79a688a
2023/11/22 22:10:20 β
Container started: e4f6d79a688a
2023/11/22 22:10:20 π§ Waiting for container id e4f6d79a688a image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:21 failed accessing container logs: Error response from daemon: No such container: e4f6d79a688a6d84dc0441ccaffe46f31f6229d86d647e1be987a5077279e397
postgres_test.go:157: Error response from daemon: No such container: e4f6d79a688a6d84dc0441ccaffe46f31f6229d86d647e1be987a5077279e397: could not start container: creating reaper failed: failed to create container
--- FAIL: TestWithConfigFile (1.17s)
=== RUN TestWithInitScript
2023/11/22 22:10:21 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:21 β
Container created: df98276e1f2d
2023/11/22 22:10:21 π³ Starting container: df98276e1f2d
2023/11/22 22:10:22 β
Container started: df98276e1f2d
2023/11/22 22:10:22 π§ Waiting for container id df98276e1f2d image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:22 failed accessing container logs: Error response from daemon: No such container: df98276e1f2df69ffc55dbc20c9b4b2dba41311eae20a495f1605460553b0c74
postgres_test.go:188: Error response from daemon: No such container: df98276e1f2df69ffc55dbc20c9b4b2dba41311eae20a495f1605460553b0c74: could not start container: creating reaper failed: failed to create container
--- FAIL: TestWithInitScript (1.12s)
=== RUN ExampleRunContainer
2023/11/22 22:10:22 π³ Creating container for image docker.io/testcontainers/ryuk:0.5.1
2023/11/22 22:10:22 β
Container created: cc149a3ba4f6
2023/11/22 22:10:22 π³ Starting container: cc149a3ba4f6
2023/11/22 22:10:23 β
Container started: cc149a3ba4f6
2023/11/22 22:10:23 π§ Waiting for container id cc149a3ba4f6 image: docker.io/testcontainers/ryuk:0.5.1. Waiting for: &{Port:8080/tcp timeout:<nil> PollInterval:100ms}
2023/11/22 22:10:23 failed accessing container logs: Error response from daemon: No such container: cc149a3ba4f6ec20b6c0035a3924eb5a40459d113cb8b94202782b07b71bc8ee
--- FAIL: ExampleRunContainer (1.19s)
panic: Error response from daemon: No such container: cc149a3ba4f6ec20b6c0035a3924eb5a40459d113cb8b94202782b07b71bc8ee: could not start container: creating reaper failed: failed to create container [recovered]
panic: Error response from daemon: No such container: cc149a3ba4f6ec20b6c0035a3924eb5a40459d113cb8b94202782b07b71bc8ee: could not start container: creating reaper failed: failed to create container
goroutine 1 [running]:
testing.(*InternalExample).processRunResult(0xc000463bd8, {0x0, 0x0}, 0x0?, 0x0, {0xdfa1e0, 0xc0004a05e0})
C:/Program Files/Go/src/testing/example.go:95 +0x645
testing.runExample.func2()
C:/Program Files/Go/src/testing/run_example.go:59 +0x11a
panic({0xdfa1e0?, 0xc0004a05e0?})
C:/Program Files/Go/src/runtime/panic.go:914 +0x21f
github.com/testcontainers/testcontainers-go/modules/postgres_test.ExampleRunContainer()
C:/_code/testcontainers-go/modules/postgres/examples_test.go:35 +0x5e5
testing.runExample({{0xeb2b67, 0x13}, 0xef0720, {0xea9cde, 0x5}, 0x0})
C:/Program Files/Go/src/testing/run_example.go:63 +0x2cd
testing.runExamples(0xc000463d98, {0x13816a0?, 0x1, 0x4?})
C:/Program Files/Go/src/testing/example.go:44 +0x171
testing.(*M).Run(0xc000305540)
C:/Program Files/Go/src/testing/testing.go:1927 +0x6e6
main.main()
_testmain.go:57 +0x19c
exit status 2
FAIL github.com/testcontainers/testcontainers-go/modules/postgres 10.646s
Now it still fails if I disable ryuk
PS C:\_code\testcontainers-go\modules\postgres> $env:TESTCONTAINERS_RYUK_DISABLED="true"
PS C:\_code\testcontainers-go\modules\postgres> go test -v
=== RUN TestPostgres
=== RUN TestPostgres/Postgres
**********************************************************************************************
Ryuk has been disabled for the current execution. This can cause unexpected behavior in your environment.
More on this: https://golang.testcontainers.org/features/garbage_collector/
**********************************************************************************************
2023/11/22 22:11:37 π³ Creating container for image docker.io/postgres:15.2-alpine
2023/11/22 22:11:38 β
Container created: 19a23df3865d
2023/11/22 22:11:38 π³ Starting container: 19a23df3865d
2023/11/22 22:11:39 β
Container started: 19a23df3865d
2023/11/22 22:11:39 π§ Waiting for container id 19a23df3865d image: docker.io/postgres:15.2-alpine. Waiting for: &{timeout:<nil> deadline:0xc000386868 Strategies:[0xc0003cca20]}
2023/11/22 22:11:42 π³ Terminating container: 19a23df3865d
2023/11/22 22:11:43 π« Container terminated: 19a23df3865d
=== RUN TestPostgres/Timescale
2023/11/22 22:11:43 π³ Creating container for image docker.io/timescale/timescaledb:2.1.0-pg11
2023/11/22 22:11:43 β
Container created: 99ce448dd62e
2023/11/22 22:11:43 π³ Starting container: 99ce448dd62e
2023/11/22 22:11:43 β
Container started: 99ce448dd62e
2023/11/22 22:11:43 π§ Waiting for container id 99ce448dd62e image: docker.io/timescale/timescaledb:2.1.0-pg11. Waiting for: &{timeout:<nil> deadline:0xc0003868e0 Strategies:[0xc0003cca50]}
2023/11/22 22:11:47 π³ Terminating container: 99ce448dd62e
2023/11/22 22:11:48 π« Container terminated: 99ce448dd62e
=== RUN TestPostgres/Postgis
2023/11/22 22:11:48 π³ Creating container for image docker.io/postgis/postgis:12-3.0
2023/11/22 22:11:48 β
Container created: 78f6fba31d0d
2023/11/22 22:11:48 π³ Starting container: 78f6fba31d0d
2023/11/22 22:11:48 β
Container started: 78f6fba31d0d
2023/11/22 22:11:48 π§ Waiting for container id 78f6fba31d0d image: docker.io/postgis/postgis:12-3.0. Waiting for: &{timeout:<nil> deadline:0xc000387160 Strategies:[0xc0003cca80]}
2023/11/22 22:11:54 π³ Terminating container: 78f6fba31d0d
2023/11/22 22:11:54 π« Container terminated: 78f6fba31d0d
--- PASS: TestPostgres (17.13s)
--- PASS: TestPostgres/Postgres (5.20s)
--- PASS: TestPostgres/Timescale (5.04s)
--- PASS: TestPostgres/Postgis (6.89s)
=== RUN TestContainerWithWaitForSQL
=== RUN TestContainerWithWaitForSQL/default_query
2023/11/22 22:11:54 π³ Creating container for image docker.io/postgres:11-alpine
2023/11/22 22:11:55 β
Container created: 9b8e2de74b65
2023/11/22 22:11:55 π³ Starting container: 9b8e2de74b65
2023/11/22 22:11:55 β
Container started: 9b8e2de74b65
2023/11/22 22:11:55 π§ Waiting for container id 9b8e2de74b65 image: docker.io/postgres:11-alpine. Waiting for: &{timeout:<nil> deadline:0xc000387110 Strategies:[0xc000068500]}
=== RUN TestContainerWithWaitForSQL/custom_query
2023/11/22 22:11:58 π³ Creating container for image docker.io/postgres:11-alpine
2023/11/22 22:11:58 β
Container created: d818076e6cf7
2023/11/22 22:11:58 π³ Starting container: d818076e6cf7
2023/11/22 22:11:59 β
Container started: d818076e6cf7
2023/11/22 22:11:59 π§ Waiting for container id d818076e6cf7 image: docker.io/postgres:11-alpine. Waiting for: &{timeout:<nil> deadline:0xc0005032e0 Strategies:[0xc000068f00]}
=== RUN TestContainerWithWaitForSQL/custom_bad_query
2023/11/22 22:12:02 π³ Creating container for image docker.io/postgres:11-alpine
2023/11/22 22:12:02 β
Container created: be441d115de0
2023/11/22 22:12:02 π³ Starting container: be441d115de0
2023/11/22 22:12:02 β
Container started: be441d115de0
2023/11/22 22:12:02 π§ Waiting for container id be441d115de0 image: docker.io/postgres:11-alpine. Waiting for: &{timeout:<nil> deadline:0xc0001cff88 Strategies:[0xc0002b2690]}
2023/11/22 22:12:07 container logs (Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.43/containers/be441d115de057616a5a47d5bec7258379f090d2f40dc8cd614116e015cb9eb5/json": context deadline exceeded):
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default timezone ... UTC
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
sh: locale: not found
2023-11-23 06:12:03.828 UTC [30] WARNING: no usable system locales were found
performing post-bootstrap initialization ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start....2023-11-23 06:12:05.226 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-11-23 06:12:05.238 UTC [37] LOG: database system was shut down at 2023-11-23 06:12:04 UTC
2023-11-23 06:12:05.245 UTC [36] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE
/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
waiting for server to shut down....2023-11-23 06:12:05.575 UTC [36] LOG: received fast shutdown request
2023-11-23 06:12:05.575 UTC [36] LOG: aborting any active transactions
2023-11-23 06:12:05.577 UTC [36] LOG: background worker "logical replication launcher" (PID 43) exited with exit code 1
2023-11-23 06:12:05.577 UTC [38] LOG: shutting down
2023-11-23 06:12:05.582 UTC [36] LOG: database system is shut down
done
server stopped
PostgreSQL init process complete; ready for start up.
2023-11-23 06:12:05.688 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-11-23 06:12:05.688 UTC [1] LOG: listening on IPv6 address "::", port 5432
2023-11-23 06:12:05.688 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-11-23 06:12:05.700 UTC [51] LOG: database system was shut down at 2023-11-23 06:12:05 UTC
2023-11-23 06:12:05.707 UTC [1] LOG: database system is ready to accept connections
2023-11-23 06:12:05.803 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:05.803 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:05.885 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:05.885 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:05.981 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:05.981 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.091 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.091 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.189 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.189 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.297 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.297 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.442 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.442 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.481 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.481 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.592 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.592 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.683 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.683 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.793 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.793 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.887 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.887 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:06.980 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:06.980 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:07.103 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:07.103 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:07.182 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:07.182 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:07.292 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:07.292 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:07.386 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:07.386 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:07.481 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:07.481 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:07.590 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:07.590 UTC [58] STATEMENT: SELECT 'a' from b
2023-11-23 06:12:07.686 UTC [58] ERROR: relation "b" does not exist at character 17
2023-11-23 06:12:07.686 UTC [58] STATEMENT: SELECT 'a' from b
--- PASS: TestContainerWithWaitForSQL (12.83s)
--- PASS: TestContainerWithWaitForSQL/default_query (3.64s)
--- PASS: TestContainerWithWaitForSQL/custom_query (3.53s)
--- PASS: TestContainerWithWaitForSQL/custom_bad_query (5.66s)
=== RUN TestWithConfigFile
2023/11/22 22:12:07 π³ Creating container for image docker.io/postgres:11-alpine
2023/11/22 22:12:07 β
Container created: 79a029cf3d63
2023/11/22 22:12:07 π³ Starting container: 79a029cf3d63
2023/11/22 22:12:08 β
Container started: 79a029cf3d63
2023/11/22 22:12:08 π§ Waiting for container id 79a029cf3d63 image: docker.io/postgres:11-alpine. Waiting for: &{timeout:<nil> deadline:0xc00058c3f8 Strategies:[0xc0004b2870]}
2023/11/22 22:12:11 π³ Terminating container: 79a029cf3d63
2023/11/22 22:12:12 π« Container terminated: 79a029cf3d63
--- PASS: TestWithConfigFile (4.65s)
=== RUN TestWithInitScript
2023/11/22 22:12:12 π³ Creating container for image docker.io/postgres:15.2-alpine
2023/11/22 22:12:12 β
Container created: 279fbec6a8fc
2023/11/22 22:12:12 π³ Starting container: 279fbec6a8fc
2023/11/22 22:12:13 β
Container started: 279fbec6a8fc
2023/11/22 22:12:13 π§ Waiting for container id 279fbec6a8fc image: docker.io/postgres:15.2-alpine. Waiting for: &{timeout:<nil> deadline:0xc000170a88 Strategies:[0xc0005077a0]}
2023/11/22 22:12:18 container logs (container exited with code 127):
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
sh: locale: not found
2023-11-23 06:12:15.144 UTC [30] WARNING: no usable system locales were found
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
waiting for server to start....2023-11-23 06:12:17.119 UTC [36] LOG: starting PostgreSQL 15.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
2023-11-23 06:12:17.119 UTC [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-11-23 06:12:17.123 UTC [39] LOG: database system was shut down at 2023-11-23 06:12:16 UTC
2023-11-23 06:12:17.127 UTC [36] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init-user-db.sh
/usr/local/bin/docker-entrypoint.sh: line 170: /docker-entrypoint-initdb.d/init-user-db.sh: cannot execute: required file not found
postgres_test.go:188: container exited with code 127: failed to start container
--- FAIL: TestWithInitScript (5.60s)
=== RUN ExampleRunContainer
2023/11/22 22:12:18 π³ Creating container for image docker.io/postgres:15.2-alpine
2023/11/22 22:12:18 β
Container created: 5299fd4d92b4
2023/11/22 22:12:18 π³ Starting container: 5299fd4d92b4
2023/11/22 22:12:18 β
Container started: 5299fd4d92b4
2023/11/22 22:12:18 π§ Waiting for container id 5299fd4d92b4 image: docker.io/postgres:15.2-alpine. Waiting for: &{timeout:<nil> deadline:0xc00058c268 Strategies:[0xc000506b70]}
2023/11/22 22:12:22 container logs (container exited with code 127):
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
sh: locale: not found
2023-11-23 06:12:19.966 UTC [30] WARNING: no usable system locales were found
performing post-bootstrap initialization ... ok
initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
syncing data to disk ... ok
Success. You can now start the database server using:
pg_ctl -D /var/lib/postgresql/data -l logfile start
waiting for server to start....2023-11-23 06:12:21.585 GMT [36] LOG: starting PostgreSQL 15.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
2023-11-23 06:12:21.586 GMT [36] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-11-23 06:12:21.588 GMT [39] LOG: database system was shut down at 2023-11-23 06:12:20 GMT
2023-11-23 06:12:21.596 GMT [36] LOG: database system is ready to accept connections
done
server started
CREATE DATABASE
/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/init-user-db.sh
/usr/local/bin/docker-entrypoint.sh: line 170: /docker-entrypoint-initdb.d/init-user-db.sh: cannot execute: required file not found
--- FAIL: ExampleRunContainer (4.19s)
panic: container exited with code 127: failed to start container [recovered]
panic: container exited with code 127: failed to start container
goroutine 1 [running]:
testing.(*InternalExample).processRunResult(0xc0002e3bd8, {0x0, 0x0}, 0x0?, 0x0, {0x138a1e0, 0xc000200300})
C:/Program Files/Go/src/testing/example.go:95 +0x645
testing.runExample.func2()
C:/Program Files/Go/src/testing/run_example.go:59 +0x11a
panic({0x138a1e0?, 0xc000200300?})
C:/Program Files/Go/src/runtime/panic.go:914 +0x21f
github.com/testcontainers/testcontainers-go/modules/postgres_test.ExampleRunContainer()
C:/_code/testcontainers-go/modules/postgres/examples_test.go:35 +0x5e5
testing.runExample({{0x1442b67, 0x13}, 0x1480720, {0x1439cde, 0x5}, 0x0})
C:/Program Files/Go/src/testing/run_example.go:63 +0x2cd
testing.runExamples(0xc0002e3d98, {0x19116a0?, 0x1, 0x4?})
C:/Program Files/Go/src/testing/example.go:44 +0x171
testing.(*M).Run(0xc0003dcdc0)
C:/Program Files/Go/src/testing/testing.go:1927 +0x6e6
main.main()
_testmain.go:57 +0x19c
exit status 2
FAIL github.com/testcontainers/testcontainers-go/modules/postgres 45.155s