Re: SSL Tests for sslinfo extension

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-05-20T18:40:48Z
Lists: pgsql-hackers

Attachments

> On 19 May 2021, at 21:05, Andrew Dunstan <andrew@dunslane.net> wrote:
> 
> On 5/19/21 1:01 PM, Dagfinn Ilmari Mannsåker wrote:
>> Daniel Gustafsson <daniel@yesql.se> writes:
>> 
>>> In order to be able to test extensions with SSL connections, allow
>>> configure_test_server_for_ssl to create any extensions passed as
>>> comma separated list. Each extension is created in all the test
>>> databases which may or may not be useful.
>> Why the comma-separated string, rather than an array reference,
>> i.e. `extensions => [qw(foo bar baz)]`?  

No real reason, I just haven't written Perl enough lately to "think in Perl".
Fixed in the attached.

>> Also, should it use `CREATE
>> EXTENSION .. CASCADE`, in case the specified extensions depend on
>> others?

Good point.  Each extension will have to be in EXTRA_INSTALL as well of course,
but we should to CASCADE.

> Also, instead of one line per db there should be an inner loop over the
> db  names.

Right, I was lazily using the same approach as for CREATE DATABASE but when the
list is used it two places it should be a proper list.  Fixed in the attached.

--
Daniel Gustafsson		https://vmware.com/

Commits

  1. Use test-specific temp path for keys during SSL test

  2. Add TAP tests for contrib/sslinfo

  3. Extend configure_test_server_for_ssl to add extensions