@@ -96,6 +96,10 @@ def postgres15_port() -> int:
9696def postgres16_port () -> int :
9797 return 5427
9898
99+ @pytest .fixture (scope = "session" )
100+ def postgres17_port () -> int :
101+ return 5428
102+
99103
100104@pytest .fixture (scope = "session" )
101105def default_postgres_service_name () -> str :
@@ -252,6 +256,33 @@ def postgres16_service(
252256 yield postgres_docker_services
253257
254258
259+ @pytest .fixture (autouse = False , scope = "session" )
260+ def postgres17_service (
261+ postgres_docker_services : DockerServiceRegistry ,
262+ postgres_docker_compose_files : list [Path ],
263+ postgres17_port : int ,
264+ postgres_database : str ,
265+ postgres_user : str ,
266+ postgres_password : str ,
267+ ) -> Generator [DockerServiceRegistry , None , None ]:
268+ os .environ ["POSTGRES_PASSWORD" ] = postgres_password
269+ os .environ ["POSTGRES_USER" ] = postgres_user
270+ os .environ ["POSTGRES_DATABASE" ] = postgres_database
271+ os .environ ["POSTGRES17_PORT" ] = str (postgres17_port )
272+ postgres_docker_services .start (
273+ "postgres17" ,
274+ docker_compose_files = postgres_docker_compose_files ,
275+ timeout = 45 ,
276+ pause = 1 ,
277+ check = postgres_responsive ,
278+ port = postgres17_port ,
279+ database = postgres_database ,
280+ user = postgres_user ,
281+ password = postgres_password ,
282+ )
283+ yield postgres_docker_services
284+
285+
255286# alias to the latest
256287@pytest .fixture (autouse = False , scope = "session" )
257288def postgres_service (
0 commit comments