[Qgis-developer] Add some postgresql PKI authentication tests to Travis

Sandro Santilli strk at kbt.io
Thu Oct 20 02:53:00 PDT 2016


On Thu, Oct 20, 2016 at 11:31:06AM +0200, Alessandro Pasotti wrote:
> Hi,
> 
> I'm looking into adding some tests for the auth system, I've successfully
> run some local tests with a properly configured postgres instance running
> as unprivileged user.
> 
> The question is: given that the current travis config does not use sudo,
> can we alter the system postgresql.conf and pg_hba.conf to add hostssl
> connection and certificates?

I think you can't, with Travis/Docker (sudo:false).

> The alternative (that should work just fine) is to launch another postgres
> process on an unprivileged port from the test itself, configure it to use
> PKI , initdb on a temporary folder, run the test and shutdown the postgres.

This one should work.

> Any hint?

Start using docker containers for build ?
https://docs.travis-ci.com/user/docker/

With docker based builds you could make the test-oriented system as you need
it (all deps in, multiple postgresql versions, other services, multiple
configs) and run the build and the tests in such custom system.

--strk;


More information about the Qgis-developer mailing list