1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-08 06:02:22 +03:00

Apply more consistent style for command options in TAP tests

This commit reshapes the grammar of some commands to apply a more
consistent style across the board, following rules similar to
ce1b0f9da0:
- Elimination of some pointless used-once variables.
- Use of long options, to self-document better the options used.
- Use of fat commas to link option names and their assigned values,
including redirections, so as perltidy can be tricked to put them
together.

Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Discussion: https://postgr.es/m/87jz8rzf3h.fsf@wibble.ilmari.org
This commit is contained in:
Michael Paquier
2025-03-17 12:42:23 +09:00
parent 5721e5453e
commit 19c6e92b13
43 changed files with 522 additions and 399 deletions

View File

@@ -28,7 +28,7 @@ sub query_log
}
my $node = PostgreSQL::Test::Cluster->new('main');
$node->init('auth_extra' => [ '--create-role', 'regress_user1' ]);
$node->init('auth_extra' => [ '--create-role' => 'regress_user1' ]);
$node->append_conf('postgresql.conf',
"session_preload_libraries = 'auto_explain'");
$node->append_conf('postgresql.conf', "auto_explain.log_min_duration = 0");

View File

@@ -131,8 +131,10 @@ sub verify_backup
# Untar.
my $extract_path = PostgreSQL::Test::Utils::tempdir;
system_or_bail($tar, 'xf', $backup_dir . '/' . $prefix . 'base.tar',
'-C', $extract_path);
system_or_bail(
$tar,
'xf' => $backup_dir . '/' . $prefix . 'base.tar',
'-C' => $extract_path);
# Verify.
$node->command_ok(

View File

@@ -216,8 +216,7 @@ $node->append_conf('postgresql.conf', 'log_statement=none');
'-D' => $node->data_dir,
'template0'
],
'<',
$ENV{share_contrib_dir} . '/sepgsql.sql');
'<' => $ENV{share_contrib_dir} . '/sepgsql.sql');
ok($result, 'sepgsql installation script');
}