Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions - Mailing list pgsql-hackers

From Sadhuprasad Patro
Subject Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions
Date
Msg-id CAFF0-CGiu-+QN7+TS-2AxOZTEeN_1=b5i7pdtndRbqc1KVuPzw@mail.gmail.com
Whole thread Raw
In response to Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions
List pgsql-hackers


On Fri, Oct 31, 2025 at 6:19 AM Michael Paquier <michael@paquier.xyz> wrote:
On Thu, Oct 30, 2025 at 05:00:27PM +0530, Sadhuprasad Patro wrote:
> On Fri, Oct 17, 2025 at 11:11 AM Michael Paquier <michael@paquier.xyz>
> wrote:
>> -ok($node->log_contains(qr/no SSL error reported/) == 0,
>> +is($node->log_contains(qr/no SSL error reported/), 0
>>
>> The CI was failing with the change in the SSL tests, as of:
>> [05:03:12.647] #   at
>> /tmp/cirrus-ci-build/src/test/ssl/t/001_ssltests.pl line 127.
>> [05:03:12.647] #          got: ''
>> [05:03:12.647] #     expected: '0'

Sadhuprasad, there was still a bit more we could do.  Related to this
issue with the SSL test, what do you think about the introduction of a
log_contains_like() in Cluster.pm where we would directly call like()
in the subroutine?  This way, we would be able to report in the output
the contents of the server logs we are trying to match (or not match)
with a pattern, making debugging easier.  What do you think?
--
Michael


pgsql-hackers by date:

Previous
From: "Tristan Partin"
Date:
Subject: Re: meson's in-tree libpq header search order vs -Dextra_include_dirs
Next
From: Michael Paquier
Date:
Subject: Re: Improved TAP tests by replacing sub-optimal uses of ok() with better Test::More functions