From 192c51576a190fd98cf3dcbf807765bc42ed434b Mon Sep 17 00:00:00 2001 From: Marco Beck Date: Mon, 10 Jan 2022 21:11:21 +0100 Subject: [PATCH] add tests for PostgreSQL 14 --- Makefile | 2 +- README.md | 2 +- ci/install.sh | 4 ++-- test/conftest.py | 2 +- test/test_utils.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index a3b2055..a9a8be2 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ PYTHON ?= python3 PYTHON_SOURCE_DIRS = aiven_db_migrate/ test/ -PG_VERSIONS = 95 96 10 11 12 13 +PG_VERSIONS = 95 96 10 11 12 13 14 generated = aiven_db_migrate/migrate/version.py diff --git a/README.md b/README.md index db0ce56..6d28e44 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ or, if installed: $ pg_migrate -h ``` -Migrating is supported to the same or newer PostgreSQL version starting from PostgreSQL 9.5 to PostgreSQL 13. +Migrating is supported to the same or newer PostgreSQL version starting from PostgreSQL 9.5 to PostgreSQL 14. Migrating to older version is not supported. Supports regular data dump (`pg_dump`) and [logical replication](https://www.postgresql.org/docs/current/logical-replication.html) (PostgreSQL 10 or newer). diff --git a/ci/install.sh b/ci/install.sh index 13942fd..9e5be6f 100755 --- a/ci/install.sh +++ b/ci/install.sh @@ -9,12 +9,12 @@ dpkg-reconfigure --frontend noninteractive tzdata echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - apt-get -y update -apt-get install -y postgresql-{9.5,9.6,10,11,12,13} postgresql-{9.5,9.6,10,11,12,13}-postgis-3 postgresql-{9.5,9.6,10,11,12,13}-pgextwlist +apt-get install -y postgresql-{9.5,9.6,10,11,12,13,14} postgresql-{9.5,9.6,10,11,12,13,14}-postgis-3 postgresql-{9.5,9.6,10,11,12,13,14}-pgextwlist git clone https://github.com/aiven/aiven-extras /aiven-extras make -C /aiven-extras clean rpm # maybe add a deb target to aiven-extras in the future, but for now, while hacky, this is (probably) terser and less intrusive -for dest in "9.6" "10" "11" "12" "13" +for dest in "9.6" "10" "11" "12" "13" "14" do cp /aiven-extras/build/aiven_extras.control /usr/share/postgresql/${dest}/extension/ cp /aiven-extras/sql/*.sql /usr/share/postgresql/${dest}/extension/ diff --git a/test/conftest.py b/test/conftest.py index c0caaeb..783c4fb 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -401,7 +401,7 @@ def inject_pg_fixture(*, name: str, pgversion: str, scope="module"): globals()[name] = generate_pg_fixture(name=name, pgversion=pgversion, scope=scope) -SUPPORTED_PG_VERSIONS = ["9.5", "9.6", "10", "11", "12", "13"] +SUPPORTED_PG_VERSIONS = ["9.5", "9.6", "10", "11", "12", "13", "14"] pg_cluster_for_tests: List[str] = list() pg_source_and_target_for_tests: List[Tuple[str, str]] = list() pg_source_and_target_for_replication_tests: List[Tuple[str, str]] = list() diff --git a/test/test_utils.py b/test/test_utils.py index b522de4..c6aa801 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -9,7 +9,7 @@ def test_pgbin_dir_exists_for_supported_versions(): - for pgversion in ("9.5", "9.6", "10", "10.4", "11", "11.7", "12", "12.2", "13"): + for pgversion in ("9.5", "9.6", "10", "10.4", "11", "11.7", "12", "12.2", "13", "14"): find_pgbin_dir(pgversion) for pgversion in ("12345", "12345.6"): with pytest.raises(ValueError, match=f"Couldn't find bin dir for pg version '{pgversion}'.*"):