diff options
Diffstat (limited to 'src/bin/pg_verifybackup')
-rw-r--r-- | src/bin/pg_verifybackup/t/002_algorithm.pl | 14 | ||||
-rw-r--r-- | src/bin/pg_verifybackup/t/003_corruption.pl | 12 | ||||
-rw-r--r-- | src/bin/pg_verifybackup/t/004_options.pl | 10 | ||||
-rw-r--r-- | src/bin/pg_verifybackup/t/006_encoding.pl | 10 | ||||
-rw-r--r-- | src/bin/pg_verifybackup/t/007_wal.pl | 12 |
5 files changed, 29 insertions, 29 deletions
diff --git a/src/bin/pg_verifybackup/t/002_algorithm.pl b/src/bin/pg_verifybackup/t/002_algorithm.pl index d0c97ae3cc3..6c118832668 100644 --- a/src/bin/pg_verifybackup/t/002_algorithm.pl +++ b/src/bin/pg_verifybackup/t/002_algorithm.pl @@ -9,13 +9,13 @@ use PostgresNode; use TestLib; use Test::More tests => 19; -my $master = get_new_node('master'); -$master->init(allows_streaming => 1); -$master->start; +my $primary = get_new_node('primary'); +$primary->init(allows_streaming => 1); +$primary->start; for my $algorithm (qw(bogus none crc32c sha224 sha256 sha384 sha512)) { - my $backup_path = $master->backup_dir . '/' . $algorithm; + my $backup_path = $primary->backup_dir . '/' . $algorithm; my @backup = ( 'pg_basebackup', '-D', $backup_path, '--manifest-checksums', $algorithm, '--no-sync'); @@ -24,13 +24,13 @@ for my $algorithm (qw(bogus none crc32c sha224 sha256 sha384 sha512)) # A backup with a bogus algorithm should fail. if ($algorithm eq 'bogus') { - $master->command_fails(\@backup, + $primary->command_fails(\@backup, "backup fails with algorithm \"$algorithm\""); next; } # A backup with a valid algorithm should work. - $master->command_ok(\@backup, "backup ok with algorithm \"$algorithm\""); + $primary->command_ok(\@backup, "backup ok with algorithm \"$algorithm\""); # We expect each real checksum algorithm to be mentioned on every line of # the backup manifest file except the first and last; for simplicity, we @@ -50,7 +50,7 @@ for my $algorithm (qw(bogus none crc32c sha224 sha256 sha384 sha512)) } # Make sure that it verifies OK. - $master->command_ok(\@verify, + $primary->command_ok(\@verify, "verify backup with algorithm \"$algorithm\""); # Remove backup immediately to save disk space. diff --git a/src/bin/pg_verifybackup/t/003_corruption.pl b/src/bin/pg_verifybackup/t/003_corruption.pl index c2e04d0be20..0c0691ba2b2 100644 --- a/src/bin/pg_verifybackup/t/003_corruption.pl +++ b/src/bin/pg_verifybackup/t/003_corruption.pl @@ -9,9 +9,9 @@ use PostgresNode; use TestLib; use Test::More tests => 44; -my $master = get_new_node('master'); -$master->init(allows_streaming => 1); -$master->start; +my $primary = get_new_node('primary'); +$primary->init(allows_streaming => 1); +$primary->start; # Include a user-defined tablespace in the hopes of detecting problems in that # area. @@ -19,7 +19,7 @@ my $source_ts_path = TestLib::perl2host(TestLib::tempdir_short()); my $source_ts_prefix = $source_ts_path; $source_ts_prefix =~ s!(^[A-Z]:/[^/]*)/.*!$1!; -$master->safe_psql('postgres', <<EOM); +$primary->safe_psql('postgres', <<EOM); CREATE TABLE x1 (a int); INSERT INTO x1 VALUES (111); CREATE TABLESPACE ts1 LOCATION '$source_ts_path'; @@ -103,13 +103,13 @@ for my $scenario (@scenario) if $scenario->{'skip_on_windows'} && $windows_os; # Take a backup and check that it verifies OK. - my $backup_path = $master->backup_dir . '/' . $name; + my $backup_path = $primary->backup_dir . '/' . $name; my $backup_ts_path = TestLib::perl2host(TestLib::tempdir_short()); # The tablespace map parameter confuses Msys2, which tries to mangle # it. Tell it not to. # See https://www.msys2.org/wiki/Porting/#filesystem-namespaces local $ENV{MSYS2_ARG_CONV_EXCL} = $source_ts_prefix; - $master->command_ok( + $primary->command_ok( [ 'pg_basebackup', '-D', $backup_path, '--no-sync', '-T', "${source_ts_path}=${backup_ts_path}" diff --git a/src/bin/pg_verifybackup/t/004_options.pl b/src/bin/pg_verifybackup/t/004_options.pl index 271b7ee5043..1bd0aab5459 100644 --- a/src/bin/pg_verifybackup/t/004_options.pl +++ b/src/bin/pg_verifybackup/t/004_options.pl @@ -10,11 +10,11 @@ use TestLib; use Test::More tests => 25; # Start up the server and take a backup. -my $master = get_new_node('master'); -$master->init(allows_streaming => 1); -$master->start; -my $backup_path = $master->backup_dir . '/test_options'; -$master->command_ok([ 'pg_basebackup', '-D', $backup_path, '--no-sync' ], +my $primary = get_new_node('primary'); +$primary->init(allows_streaming => 1); +$primary->start; +my $backup_path = $primary->backup_dir . '/test_options'; +$primary->command_ok([ 'pg_basebackup', '-D', $backup_path, '--no-sync' ], "base backup ok"); # Verify that pg_verifybackup -q succeeds and produces no output. diff --git a/src/bin/pg_verifybackup/t/006_encoding.pl b/src/bin/pg_verifybackup/t/006_encoding.pl index 5ab9649ab6f..35b854a78e8 100644 --- a/src/bin/pg_verifybackup/t/006_encoding.pl +++ b/src/bin/pg_verifybackup/t/006_encoding.pl @@ -8,11 +8,11 @@ use PostgresNode; use TestLib; use Test::More tests => 5; -my $master = get_new_node('master'); -$master->init(allows_streaming => 1); -$master->start; -my $backup_path = $master->backup_dir . '/test_encoding'; -$master->command_ok( +my $primary = get_new_node('primary'); +$primary->init(allows_streaming => 1); +$primary->start; +my $backup_path = $primary->backup_dir . '/test_encoding'; +$primary->command_ok( [ 'pg_basebackup', '-D', $backup_path, '--no-sync', diff --git a/src/bin/pg_verifybackup/t/007_wal.pl b/src/bin/pg_verifybackup/t/007_wal.pl index 56d536675c9..23a4f8bbd8d 100644 --- a/src/bin/pg_verifybackup/t/007_wal.pl +++ b/src/bin/pg_verifybackup/t/007_wal.pl @@ -10,16 +10,16 @@ use TestLib; use Test::More tests => 7; # Start up the server and take a backup. -my $master = get_new_node('master'); -$master->init(allows_streaming => 1); -$master->start; -my $backup_path = $master->backup_dir . '/test_wal'; -$master->command_ok([ 'pg_basebackup', '-D', $backup_path, '--no-sync' ], +my $primary = get_new_node('primary'); +$primary->init(allows_streaming => 1); +$primary->start; +my $backup_path = $primary->backup_dir . '/test_wal'; +$primary->command_ok([ 'pg_basebackup', '-D', $backup_path, '--no-sync' ], "base backup ok"); # Rename pg_wal. my $original_pg_wal = $backup_path . '/pg_wal'; -my $relocated_pg_wal = $master->backup_dir . '/relocated_pg_wal'; +my $relocated_pg_wal = $primary->backup_dir . '/relocated_pg_wal'; rename($original_pg_wal, $relocated_pg_wal) || die "rename pg_wal: $!"; # WAL verification should fail. |