Skip to content
Permalink
Browse files
remove 9.4 and 9.5 (#1753)
* remove 9.4 and 9.5

* ignore testAuthorized as there is no way to get a kerberos user on appveyor
  • Loading branch information
davecramer committed Apr 23, 2020
1 parent 5e97af3 commit 2aa49c05962d147e075434abf9adb8f9461bfd52
Showing 4 changed files with 16 additions and 14 deletions.
@@ -7,10 +7,6 @@ environment:
PGUSER: postgres
PGPASSWORD: Password12!
matrix:
- pg: 9.4.19-1
PlatformToolset: v120
- pg: 9.5.15-1
PlatformToolset: v120
- pg: 9.6.11-1
PlatformToolset: v120
- pg: 10.6-1
@@ -24,13 +20,13 @@ matrix:
PlatformToolset: v140
- platform: x86
pg: master
init:

init:
- set pf=%ProgramFiles%&& set x64=-x64
- set exe=postgresql-%pg%-windows%x64%.exe
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# We expect that Windows would have CRLF for newlines, so autocrlf=true should be used
# to automatically convert text files to CRLF on checkout
# We expect that Windows would have CRLF for newlines, so autocrlf=true should be used
# to automatically convert text files to CRLF on checkout
- git config --global core.autocrlf true

branches:
@@ -55,10 +51,12 @@ before_build:
- ps: Add-Content -PATH "$env:pgroot\data\pg_hba.conf" "host replication all 127.0.0.1/32 trust"
- net start postgresql%x64%-%pgversion%
- path %pgroot%\bin;%PATH%
- SET PGUSER=postgres
- SET PGPASSWORD=Password12!
- SET PGUSER=postgres
- SET PGPASSWORD=Password12!
- createuser -U postgres test
- psql -U postgres -c "alter user test with password 'test'" postgres
- psql -U postgres -c "alter user test with password 'test'" postgres
- psql -U postgres -c "alter user test with replication" postgres
- createuser -U postgres testsspi
- createdb -U postgres -O test test

build_script:
@@ -175,7 +175,7 @@ public void startSSPI() throws SQLException, IOException {
}

/**
* Continue an existing authentication conversation with the back-end in resonse to an
* Continue an existing authentication conversation with the back-end in response to an
* authentication request of type AUTH_REQ_GSS_CONT.
*
* @param msgLength Length of message to read, excluding length word and message type word
@@ -73,6 +73,7 @@ public enum PSQLState {

INVALID_SQL_STATEMENT_NAME("26000"),
INVALID_AUTHORIZATION_SPECIFICATION("28000"),
INVALID_PASSWORD("28P01"),

INVALID_TRANSACTION_TERMINATION("2D000"),

@@ -7,15 +7,16 @@

import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeThat;

import org.postgresql.test.TestUtil;
import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;

import org.hamcrest.MatcherAssert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

import java.sql.Connection;
@@ -44,9 +45,11 @@ public static void checkPlatform() {
* Tests that SSPI login succeeds and a query can be run.
*/
@Test
@Ignore
public void testAuthorized() throws Exception {
Properties props = new Properties();
props.setProperty("username", TestUtil.getSSPIUser());

Connection con = TestUtil.openDB(props);

Statement stmt = con.createStatement();
@@ -69,7 +72,7 @@ public void testUnauthorized() throws Exception {
TestUtil.closeDB(con);
fail("Expected a PSQLException");
} catch (PSQLException e) {
assertThat(e.getSQLState(), is(PSQLState.INVALID_AUTHORIZATION_SPECIFICATION.getState()));
MatcherAssert.assertThat(e.getSQLState(), is(PSQLState.INVALID_PASSWORD.getState()));
}
}

0 comments on commit 2aa49c0

Please sign in to comment.