Skip to content

Commit

Permalink
Don't run upgrade tests without pg15 binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
syvb committed Jan 3, 2023
1 parent d1880a4 commit cbf5064
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/testbin
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ skip_from_version() {
[ $FROM_VERSION = 1.10.0-dev ] && return
}

# Requires:
# - FROM_VERSION
# - PG_VERSION
skip_from_version_pg_version() {
# skip versions without PG15 binaries
[ $PG_VERSION -gt 14 ] && [ `cmp_version $FROM_VERSION` -lt 011301 ] && return
}

# Requires:
# - FROM_VERSION
deb_start_test() {
Expand All @@ -105,6 +113,7 @@ deb_start_test() {

[ $cmp_version -ge $MIN_DEB_EPOCH ] && EPOCH=1:
for PG_VERSION in $PG_VERSIONS; do
skip_from_version_pg_version && continue
select_pg $PG_VERSION
deb=timescaledb-toolkit-postgresql-${PG_VERSION}=${EPOCH}${FROM_VERSION}~${OS_NAME}${OS_VERSION}
$nop sudo apt-get -qq install $deb || die
Expand All @@ -118,6 +127,7 @@ test_deb() {
for FROM_VERSION; do
deb_start_test || continue
for PG_VERSION in $PG_VERSIONS; do
skip_from_version_pg_version && continue
select_pg $PG_VERSION
deb=timescaledb-toolkit-postgresql-${PG_VERSION}_${TOOLKIT_VERSION}~${OS_NAME}${OS_VERSION}_${ARCH}.deb
$nop sudo dpkg -i "$BINDIR/$deb"
Expand All @@ -139,6 +149,7 @@ test_ci() {
for FROM_VERSION; do
deb_start_test || continue
for PG_VERSION in $PG_VERSIONS; do
skip_from_version_pg_version && continue
select_pg $PG_VERSION
$nop sudo dpkg -P timescaledb-toolkit-postgresql-$PG_VERSION
# Installing (and possibly uninstalling) toolkit binary gives this back to root but we need to write to it.
Expand All @@ -155,6 +166,7 @@ test_rpm() {
for FROM_VERSION; do
skip_from_version && continue
for PG_VERSION in $PG_VERSIONS; do
skip_from_version_pg_version && continue
select_pg $PG_VERSION
rpm=timescaledb-toolkit-postgresql-$PG_VERSION
# yum doesn't seem to allow force-install of a specific version.
Expand All @@ -167,6 +179,7 @@ test_rpm() {
start_test
done
for PG_VERSION in $PG_VERSIONS; do
skip_from_version_pg_version && continue
select_pg $PG_VERSION
rpm=timescaledb-toolkit-postgresql-$PG_VERSION-$TOOLKIT_VERSION-0.el$OS_VERSION.$ARCH.rpm
$nop sudo rpm -U "$BINDIR/$rpm"
Expand Down

0 comments on commit cbf5064

Please sign in to comment.