2121
2222BASE_PATH = os .getenv ("BASE_PATH" , default = pathlib2 .Path (__file__ ).parents [2 ])
2323TEST_BASE_PATH = f"{ BASE_PATH } /docker"
24- PROJECT_VERSION = "12.0 .0"
24+ PROJECT_VERSION = "13.2 .0"
2525
26- POSTGRES_15_VERSION = "15.4 "
27- POSTGRES_14_VERSION = "14.9 "
26+ POSTGRES_16_VERSION = "16.10 "
27+ POSTGRES_15_VERSION = "15.14 "
2828
2929PROJECT_NAME = "citus"
3030version_details = get_version_details (PROJECT_VERSION )
@@ -45,7 +45,7 @@ def teardown_module():
4545
4646def test_update_docker_file_for_latest_postgres ():
4747 update_docker_file_for_latest_postgres (
48- PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_14_VERSION
48+ PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_15_VERSION
4949 )
5050 with open (
5151 f"{ TEST_BASE_PATH } /Dockerfile" ,
@@ -55,7 +55,7 @@ def test_update_docker_file_for_latest_postgres():
5555 ) as reader :
5656 content = reader .read ()
5757 lines = content .splitlines ()
58- assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_14_VERSION } "
58+ assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_15_VERSION } "
5959 assert lines [3 ].strip () == f"ARG VERSION={ PROJECT_VERSION } "
6060 assert (
6161 f"postgresql-$PG_MAJOR-{ PROJECT_NAME } -"
@@ -83,7 +83,7 @@ def test_update_regular_docker_compose_file():
8383
8484def test_update_docker_file_alpine ():
8585 update_docker_file_alpine (
86- PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_14_VERSION
86+ PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_15_VERSION
8787 )
8888 with open (
8989 f"{ TEST_BASE_PATH } /alpine/Dockerfile" ,
@@ -93,24 +93,24 @@ def test_update_docker_file_alpine():
9393 ) as reader :
9494 content = reader .read ()
9595 lines = content .splitlines ()
96- assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_14_VERSION } -alpine"
96+ assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_15_VERSION } -alpine"
9797 assert lines [3 ].strip () == f"ARG VERSION={ PROJECT_VERSION } "
9898 assert len (lines ) == 58
9999
100100
101- def test_update_docker_file_for_postgres14 ():
102- update_docker_file_for_postgres14 (
103- PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_14_VERSION
101+ def test_update_docker_file_for_postgres15 ():
102+ update_docker_file_for_postgres15 (
103+ PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_15_VERSION
104104 )
105105 with open (
106- f"{ TEST_BASE_PATH } /postgres-14 /Dockerfile" ,
106+ f"{ TEST_BASE_PATH } /postgres-15 /Dockerfile" ,
107107 "r" ,
108108 encoding = DEFAULT_ENCODING_FOR_FILE_HANDLING ,
109109 errors = DEFAULT_UNICODE_ERROR_HANDLER ,
110110 ) as reader :
111111 content = reader .read ()
112112 lines = content .splitlines ()
113- assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_14_VERSION } "
113+ assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_15_VERSION } "
114114 assert lines [3 ].strip () == f"ARG VERSION={ PROJECT_VERSION } "
115115 assert (
116116 f"postgresql-$PG_MAJOR-{ PROJECT_NAME } -"
@@ -120,19 +120,19 @@ def test_update_docker_file_for_postgres14():
120120 assert len (lines ) == 42
121121
122122
123- def test_update_docker_file_for_postgres15 ():
124- update_docker_file_for_postgres15 (
125- PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_15_VERSION
123+ def test_update_docker_file_for_postgres16 ():
124+ update_docker_file_for_postgres16 (
125+ PROJECT_VERSION , TEMPLATE_PATH , TEST_BASE_PATH , POSTGRES_16_VERSION
126126 )
127127 with open (
128- f"{ TEST_BASE_PATH } /postgres-15 /Dockerfile" ,
128+ f"{ TEST_BASE_PATH } /postgres-16 /Dockerfile" ,
129129 "r" ,
130130 encoding = DEFAULT_ENCODING_FOR_FILE_HANDLING ,
131131 errors = DEFAULT_UNICODE_ERROR_HANDLER ,
132132 ) as reader :
133133 content = reader .read ()
134134 lines = content .splitlines ()
135- assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_15_VERSION } "
135+ assert lines [2 ].strip () == f"FROM postgres:{ POSTGRES_16_VERSION } "
136136 assert lines [3 ].strip () == f"ARG VERSION={ PROJECT_VERSION } "
137137 assert (
138138 f"postgresql-$PG_MAJOR-{ PROJECT_NAME } -"
@@ -177,5 +177,5 @@ def test_update_changelog_without_postgres():
177177
178178def test_pkgvar_postgres_version_existence ():
179179 config = dotenv_values (PKGVARS_FILE )
180+ assert config ["postgres_16_version" ]
180181 assert config ["postgres_15_version" ]
181- assert config ["postgres_14_version" ]
0 commit comments