diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-03-17 12:42:23 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-03-17 12:42:23 +0900 |
commit | 19c6e92b13b2336d1db1b236457ab15d0894b506 (patch) | |
tree | 672b72d1e75f47fbbe28db3326267804c6af6dcf /src/bin/pg_verifybackup/t/002_algorithm.pl | |
parent | 5721e5453ebc59360b6756fe72d7499c4a02177c (diff) | |
download | postgresql-19c6e92b13b2336d1db1b236457ab15d0894b506.tar.gz postgresql-19c6e92b13b2336d1db1b236457ab15d0894b506.zip |
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
ce1b0f9da03e:
- 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
Diffstat (limited to 'src/bin/pg_verifybackup/t/002_algorithm.pl')
-rw-r--r-- | src/bin/pg_verifybackup/t/002_algorithm.pl | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bin/pg_verifybackup/t/002_algorithm.pl b/src/bin/pg_verifybackup/t/002_algorithm.pl index 71aaa8d881f..ae16c11bc4d 100644 --- a/src/bin/pg_verifybackup/t/002_algorithm.pl +++ b/src/bin/pg_verifybackup/t/002_algorithm.pl @@ -19,18 +19,21 @@ sub test_checksums my ($format, $algorithm) = @_; my $backup_path = $primary->backup_dir . '/' . $format . '/' . $algorithm; my @backup = ( - 'pg_basebackup', '-D', $backup_path, - '--manifest-checksums', $algorithm, '--no-sync', '-cfast'); - my @verify = ('pg_verifybackup', '-e', $backup_path); + 'pg_basebackup', + '--pgdata' => $backup_path, + '--manifest-checksums' => $algorithm, + '--no-sync', + '--checkpoint' => 'fast'); + my @verify = ('pg_verifybackup', '--exit-on-error', $backup_path); if ($format eq 'tar') { # Add switch to get a tar-format backup - push @backup, ('-F', 't'); + push @backup, ('--format' => 'tar'); # Add switch to skip WAL verification, which is not yet supported for # tar-format backups - push @verify, ('-n'); + push @verify, ('--no-parse-wal'); } # A backup with a bogus algorithm should fail. |