Re: Refactoring SSL tests - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Refactoring SSL tests
Date
Msg-id 2ac2a9c7-7cc5-a52d-6556-3d698cf84009@dunslane.net
Whole thread Raw
In response to Re: Refactoring SSL tests  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Refactoring SSL tests  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
On 2/2/22 14:50, Daniel Gustafsson wrote:
>> On 2 Feb 2022, at 17:09, Andrew Dunstan <andrew@dunslane.net> wrote:
>> On 2/2/22 08:26, Daniel Gustafsson wrote:
>>> Thoughts?  I'm fairly sure there are many crimes against Perl in this patch,
>>> I'm happy to take pointers on how to improve that.
>> It feels a bit odd to me from a perl POV. I think it needs to more along
>> the lines of standard OO patterns. I'll take a stab at that based on
>> this, might be a few days.
> That would be great, thanks!
>

Here's the result of that surgery.  It's a little incomplete in that it
needs some POD adjustment, but I think the code is right - it passes
testing for me.

One of the advantages of this, apart from being more idiomatic, is that
by avoiding the use of package level variables you can have two
SSL::Server objects, one for OpenSSL and (eventually) one for NSS. This
was the original motivation for the recent install_path additions to
PostgreSQL::Test::Cluster, so it complements that work nicely.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: RFC: Logging plan of the running query
Next
From: Dilip Kumar
Date:
Subject: Re: Make relfile tombstone files conditional on WAL level