Skip to content

Commit 0a4bb24

Browse files
authored
Add handling for explicit Postgres image tag for testing (#24291)
* Add handling for explicit Postgres image tag for testing * Remove 19
1 parent 06f5fa3 commit 0a4bb24

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

postgres/tests/common.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,16 @@
4646
POSTGRES_VERSION = os.environ.get('POSTGRES_VERSION', None)
4747
POSTGRES_IMAGE = "alpine"
4848
POSTGRES_LOCALE = os.environ.get('POSTGRES_LOCALE', "UTF8")
49+
POSTGRES_IMAGE_TAG = os.environ.get('POSTGRES_IMAGE_TAG', None)
4950

5051
REPLICA_CONTAINER_1_NAME = 'compose-postgres_replica-1'
5152
REPLICA_CONTAINER_2_NAME = 'compose-postgres_replica2-1'
5253
REPLICA_LOGICAL_1_NAME = 'compose-postgres_logical_replica-1'
5354
USING_LATEST = False
5455

55-
if POSTGRES_VERSION is not None:
56+
if POSTGRES_IMAGE_TAG is not None:
57+
POSTGRES_IMAGE = POSTGRES_IMAGE_TAG + "-alpine"
58+
elif POSTGRES_VERSION is not None:
5659
USING_LATEST = POSTGRES_VERSION.endswith('latest')
5760
POSTGRES_IMAGE = POSTGRES_VERSION + "-alpine"
5861

0 commit comments

Comments
 (0)