Skip to content

Commit

Permalink
add tests for PostgreSQL 14
Browse files Browse the repository at this point in the history
  • Loading branch information
carobme committed Jan 10, 2022
1 parent 0853eef commit 192c515
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'.*"):
Expand Down

0 comments on commit 192c515

Please sign in to comment.