Re: Minor cleanups in the SSL tests - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Minor cleanups in the SSL tests
Date
Msg-id b9ed2061-b7b5-49cb-ac51-ad54ceab5233@eisentraut.org
Whole thread Raw
In response to Minor cleanups in the SSL tests  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Minor cleanups in the SSL tests
List pgsql-hackers
On 16.05.24 09:24, Daniel Gustafsson wrote:
> When writing a new SSL test for another patch it struck me that the SSL tests
> are doing configuration management without using the test framework API's.  The
> attached patches cleans this up, no testcases are altered as part of this.
> 
> 0001 makes the test for PG_TEST_EXTRA a top-level if statement not attached to
> any other conditional.  There is no change in functionality, it's mainly for
> readability (PG_TEST_EXTRA is it's own concept, not tied to library presence).

Makes sense to me.

> 0002 ports over editing configfiles to using append_conf() instead of opening
> and writing to them directly.

Yes, it's probably preferable to use append_conf() here.  You might want 
to run your patch through pgperltidy.  The result doesn't look bad, but 
a bit different than what you had crafted.

append_conf() opens and closes the file for each call.  It might be nice 
if it could accept a list.  Or you can just pass the whole block as one 
string, like it was done for pg_ident.conf before.




pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: Statistics Import and Export
Next
From: Richard Guo
Date:
Subject: Re: Wrong results with grouping sets