postgresql-jdbc.git / summary / log / commit / refs
commit e468ebdb87732bc16b43e2494b445ceeb970cbff
Author: Dave Cramer <davecramer@gmail.com>
Commit: GitHub <noreply@github.com>
Date: Fri Aug 16 16:41:32 2024 +0000
switch localhost and auth-test around (#3343)
* switch localhost and auth-test around
* use postgresql version 16
.github/workflows/main.yml | 4 +++-
test-gss/src/main/groovy/Postgres.groovy | 2 +-
test-gss/src/main/groovy/TestPostgres.groovy | 7 +++++--
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7f26740f..d7f28192 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -232,11 +232,13 @@ jobs:
if: ${{ matrix.gss == 'yes' }}
run: |
sudo apt -y update
+ sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
+ sudo apt -y install postgresql-16
sudo apt -y install krb5-kdc krb5-admin-server libkrb5-dev postgresql
- name: 'Update hosts for GSS tests'
if: ${{ matrix.gss == 'yes' }}
run: |
- sudo -- sh -c "echo 127.0.0.1 localhost auth-test-localhost.postgresql.example.com > /etc/hosts"
+ sudo -- sh -c "echo 127.0.0.1 auth-test-localhost.postgresql.example.com localhost > /etc/hosts"
cat /etc/hosts
- uses: burrunan/gradle-cache-action@v1
if: ${{ matrix.deploy_to_maven_local }}
diff --git a/test-gss/src/main/groovy/Postgres.groovy b/test-gss/src/main/groovy/Postgres.groovy
index 62c6f649..3d81fe03 100644
--- a/test-gss/src/main/groovy/Postgres.groovy
+++ b/test-gss/src/main/groovy/Postgres.groovy
@@ -6,7 +6,7 @@ class Postgres {
int port
public Postgres() {
- setupPaths('/usr/local/pgsql/14/bin/','/tmp/pgdata14')
+ setupPaths('/usr/local/pgsql/16/bin/','/tmp/pgdata16')
initDB()
}
public Postgres(String binDir, String dataDir) {
diff --git a/test-gss/src/main/groovy/TestPostgres.groovy b/test-gss/src/main/groovy/TestPostgres.groovy
index cf1629bb..0254e2f4 100644
--- a/test-gss/src/main/groovy/TestPostgres.groovy
+++ b/test-gss/src/main/groovy/TestPostgres.groovy
@@ -47,7 +47,7 @@ class TestPostgres {
if (isMac)
postgres = new Postgres()
else
- postgres = new Postgres('/usr/lib/postgresql/14/bin/', '/tmp/pggss')
+ postgres = new Postgres('/usr/lib/postgresql/16/bin/', '/tmp/pggss')
/*
make sure we can connect
*/
@@ -77,6 +77,7 @@ class TestPostgres {
System.err.println 'GSS authenticated and encrypted Connection succeeded'
} else {
Assert.fail 'GSS authenticated and encrypted Connection failed'
+ System.exit( -1)
}
} catch( Exception ex ) {
System.err.println "PG HBA.conf: \n ${postgres.readPgHBA()}"
@@ -93,6 +94,7 @@ class TestPostgres {
System.err.println 'GSS authenticated and encrypted Connection succeeded'
} else {
Assert.fail 'GSS authenticated and encrypted Connection failed'
+ System.exit( -1)
}
} catch( Exception ex ) {
System.err.println "PG HBA.conf: \n ${postgres.readPgHBA()}"
@@ -114,11 +116,12 @@ class TestPostgres {
System.err.println 'GSS authenticated and not encrypted Connection succeeded'
} else {
Assert.fail 'GSS authenticated and not encrypted Connection failed'
+ System.exit( -1)
}
}catch( Exception ex ) {
System.err.println "PG HBA.conf: \n ${postgres.readPgHBA()}"
ex.printStackTrace()
-
+ System.exit( -1)
} finally {
if (!connection) {
[parent: c185ffe3aa66]