mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
Add much-more-extensive TAP tests for pgbench.
Fabien Coelho, reviewed by Nikolay Shaplov and myself Discussion: https://postgr.es/m/alpine.DEB.2.20.1704171422500.4025@lancre
This commit is contained in:
@ -155,8 +155,9 @@ sub new
|
||||
_logfile => "$TestLib::log_path/${testname}_${name}.log" };
|
||||
|
||||
bless $self, $class;
|
||||
mkdir $self->{_basedir} or
|
||||
BAIL_OUT("could not create data directory \"$self->{_basedir}\": $!");
|
||||
mkdir $self->{_basedir}
|
||||
or
|
||||
BAIL_OUT("could not create data directory \"$self->{_basedir}\": $!");
|
||||
$self->dump_info;
|
||||
|
||||
return $self;
|
||||
@ -934,8 +935,7 @@ sub get_new_node
|
||||
# Retain the errno on die() if set, else assume a generic errno of 1.
|
||||
# This will instruct the END handler on how to handle artifacts left
|
||||
# behind from tests.
|
||||
$SIG{__DIE__} = sub
|
||||
{
|
||||
$SIG{__DIE__} = sub {
|
||||
if ($!)
|
||||
{
|
||||
$died = $!;
|
||||
@ -965,7 +965,7 @@ END
|
||||
|
||||
# clean basedir on clean test invocation
|
||||
$node->clean_node
|
||||
if TestLib::all_tests_passing() && !defined $died && !$exit_code;
|
||||
if TestLib::all_tests_passing() && !defined $died && !$exit_code;
|
||||
}
|
||||
|
||||
$? = $exit_code;
|
||||
@ -1325,9 +1325,9 @@ sub command_ok
|
||||
|
||||
=pod
|
||||
|
||||
=item $node->command_fails(...) - TestLib::command_fails with our PGPORT
|
||||
=item $node->command_fails(...)
|
||||
|
||||
See command_ok(...)
|
||||
TestLib::command_fails with our PGPORT. See command_ok(...)
|
||||
|
||||
=cut
|
||||
|
||||
@ -1359,6 +1359,23 @@ sub command_like
|
||||
|
||||
=pod
|
||||
|
||||
=item $node->command_checks_all(...)
|
||||
|
||||
TestLib::command_checks_all with our PGPORT. See command_ok(...)
|
||||
|
||||
=cut
|
||||
|
||||
sub command_checks_all
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
local $ENV{PGPORT} = $self->port;
|
||||
|
||||
TestLib::command_checks_all(@_);
|
||||
}
|
||||
|
||||
=pod
|
||||
|
||||
=item $node->issues_sql_like(cmd, expected_sql, test_name)
|
||||
|
||||
Run a command on the node, then verify that $expected_sql appears in the
|
||||
|
Reference in New Issue
Block a user