Skip to content

Commit b821407

Browse files
committed
test: add test for postgres17
1 parent ecc9f2c commit b821407

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

tests/docker/test_postgres.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ def test_postgres_16_config(
8787
assert postgres_user == "postgres"
8888
assert postgres_password == "super-secret"
8989

90+
def test_postgres_17_config(
91+
postgres17_port: int,
92+
postgres_database: str,
93+
postgres_user: str,
94+
postgres_password: str,
95+
) -> None:
96+
assert postgres17_port == 5428
97+
assert postgres_database == "postgres"
98+
assert postgres_user == "postgres"
99+
assert postgres_password == "super-secret"
90100

91101
def test_postgres_services(
92102
postgres_docker_ip: str,
@@ -195,6 +205,29 @@ def test_postgres_16_services(
195205
)
196206
assert ping
197207

208+
def test_postgres_17_services(
209+
postgres_docker_ip: str,
210+
postgres17_service: DockerServiceRegistry,
211+
postgres17_port: int,
212+
postgres_database: str,
213+
postgres_user: str,
214+
postgres_password: str,
215+
) -> None:
216+
ping = postgres_responsive(
217+
postgres_docker_ip,
218+
port=postgres17_port,
219+
database=postgres_database,
220+
user=postgres_user,
221+
password=postgres_password,
222+
)
223+
assert ping
224+
225+
def test_postgres_17_services_after_start(
226+
postgres17_startup_connection: psycopg.Connection,
227+
) -> None:
228+
postgres17_startup_connection.execute("CREATE TABLE if not exists simple_table as SELECT 1")
229+
result = postgres17_startup_connection.execute("select * from simple_table").fetchone()
230+
assert bool(result is not None and result[0] == 1)
198231

199232
def test_postgres_16_services_after_start(
200233
postgres16_startup_connection: psycopg.Connection,

0 commit comments

Comments
 (0)