Skip to content

Commit de1d4fe

Browse files
committed
Add PostgresNode::command_fails_like()
This is useful to test for a command failure with some default connection parameters associated to a node, in combination with checks on error patterns expected. This routine will be used by an upcoming future patch, but could be also plugged into some of the existing tests. Extracted from a larger patch by the same author. Author: Ronan Dunklau Discussion: https://postgr.es/m/5742739.ga3mSNWIix@aivenronan
1 parent 0f6aa89 commit de1d4fe

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/test/perl/PostgresNode.pm

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,6 +2267,26 @@ sub command_like
22672267

22682268
=pod
22692269
2270+
=item $node->command_fails_like(...)
2271+
2272+
TestLib::command_fails_like with our connection parameters. See command_ok(...)
2273+
2274+
=cut
2275+
2276+
sub command_fails_like
2277+
{
2278+
local $Test::Builder::Level = $Test::Builder::Level + 1;
2279+
2280+
my $self = shift;
2281+
2282+
local %ENV = $self->_get_env();
2283+
2284+
TestLib::command_fails_like(@_);
2285+
return;
2286+
}
2287+
2288+
=pod
2289+
22702290
=item $node->command_checks_all(...)
22712291
22722292
TestLib::command_checks_all with our connection parameters. See

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy