entc/integration: add integration testing for PG16 and PG17 (#4353)

This commit is contained in:
Jannik Clausen
2025-03-17 10:04:41 +01:00
committed by GitHub
parent 6813cdd337
commit 6109670fa2
3 changed files with 80 additions and 1 deletions

View File

@@ -241,6 +241,30 @@ jobs:
--health-interval 10s --health-interval 10s
--health-timeout 5s --health-timeout 5s
--health-retries 5 --health-retries 5
postgres16:
image: postgres:16
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
ports:
- 5436:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres17:
image: postgres:17
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
ports:
- 5437:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
gremlin-server: gremlin-server:
image: entgo/gremlin-server image: entgo/gremlin-server
ports: ports:
@@ -419,6 +443,30 @@ jobs:
--health-interval 10s --health-interval 10s
--health-timeout 5s --health-timeout 5s
--health-retries 5 --health-retries 5
postgres16:
image: postgres:16
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
ports:
- 5436:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres17:
image: postgres:17
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
ports:
- 5437:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
gremlin-server: gremlin-server:
image: entgo/gremlin-server image: entgo/gremlin-server
ports: ports:

View File

@@ -138,6 +138,28 @@ services:
ports: ports:
- 5435:5432 - 5435:5432
postgres16:
platform: linux/amd64
image: postgres:16
environment:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
healthcheck:
test: pg_isready -U postgres
ports:
- 5436:5432
postgres17:
platform: linux/amd64
image: postgres:16
environment:
POSTGRES_DB: test
POSTGRES_PASSWORD: pass
healthcheck:
test: pg_isready -U postgres
ports:
- 5437:5432
gremlin: gremlin:
platform: linux/amd64 platform: linux/amd64
image: entgo/gremlin-server image: entgo/gremlin-server

View File

@@ -106,7 +106,16 @@ func TestMaria(t *testing.T) {
} }
func TestPostgres(t *testing.T) { func TestPostgres(t *testing.T) {
for version, port := range map[string]int{"10": 5430, "11": 5431, "12": 5432, "13": 5433, "14": 5434, "15": 5435} { for version, port := range map[string]int{
"10": 5430,
"11": 5431,
"12": 5432,
"13": 5433,
"14": 5434,
"15": 5435,
"16": 5436,
"17": 5437,
} {
addr := fmt.Sprintf("host=localhost port=%d user=postgres dbname=test password=pass sslmode=disable", port) addr := fmt.Sprintf("host=localhost port=%d user=postgres dbname=test password=pass sslmode=disable", port)
t.Run(version, func(t *testing.T) { t.Run(version, func(t *testing.T) {
t.Parallel() t.Parallel()