|
8 | 8 | use File::Basename qw(basename dirname);
|
9 | 9 | use File::Path qw(rmtree);
|
10 | 10 | use Fcntl qw(:seek);
|
11 |
| -use PostgresNode; |
12 |
| -use TestLib; |
| 11 | +use PostgreSQL::Test::Cluster; |
| 12 | +use PostgreSQL::Test::Utils; |
13 | 13 | use Test::More tests => 110;
|
14 | 14 |
|
15 | 15 | program_help_ok('pg_basebackup');
|
16 | 16 | program_version_ok('pg_basebackup');
|
17 | 17 | program_options_handling_ok('pg_basebackup');
|
18 | 18 |
|
19 |
| -my $tempdir = TestLib::tempdir; |
| 19 | +my $tempdir = PostgreSQL::Test::Utils::tempdir; |
20 | 20 |
|
21 |
| -my $node = PostgresNode->new('main'); |
| 21 | +my $node = PostgreSQL::Test::Cluster->new('main'); |
22 | 22 |
|
23 | 23 | # Set umask so test directories and files are created with default permissions
|
24 | 24 | umask(0077);
|
|
238 | 238 | # to our physical temp location. That way we can use shorter names
|
239 | 239 | # for the tablespace directories, which hopefully won't run afoul of
|
240 | 240 | # the 99 character length limit.
|
241 |
| -my $sys_tempdir = TestLib::tempdir_short; |
242 |
| -my $real_sys_tempdir = TestLib::perl2host($sys_tempdir) . "/tempdir"; |
| 241 | +my $sys_tempdir = PostgreSQL::Test::Utils::tempdir_short; |
| 242 | +my $real_sys_tempdir = PostgreSQL::Test::Utils::perl2host($sys_tempdir) . "/tempdir"; |
243 | 243 | my $shorter_tempdir = $sys_tempdir . "/tempdir";
|
244 | 244 | dir_symlink "$tempdir", $shorter_tempdir;
|
245 | 245 |
|
246 | 246 | mkdir "$tempdir/tblspc1";
|
247 | 247 | my $realTsDir = "$real_sys_tempdir/tblspc1";
|
248 |
| -my $real_tempdir = TestLib::perl2host($tempdir); |
| 248 | +my $real_tempdir = PostgreSQL::Test::Utils::perl2host($tempdir); |
249 | 249 | $node->safe_psql('postgres',
|
250 | 250 | "CREATE TABLESPACE tblspc1 LOCATION '$realTsDir';");
|
251 | 251 | $node->safe_psql('postgres',
|
|
270 | 270 | skip "no tar program available", 1
|
271 | 271 | if (!defined $tar || $tar eq '');
|
272 | 272 |
|
273 |
| - my $node2 = PostgresNode->new('replica'); |
| 273 | + my $node2 = PostgreSQL::Test::Cluster->new('replica'); |
274 | 274 |
|
275 | 275 | # Recover main data directory
|
276 | 276 | $node2->init_from_backup($node, 'tarbackup2', tar_program => $tar);
|
|
279 | 279 | my $repTsDir = "$tempdir/tblspc1replica";
|
280 | 280 | my $realRepTsDir = "$real_sys_tempdir/tblspc1replica";
|
281 | 281 | mkdir $repTsDir;
|
282 |
| - TestLib::system_or_bail($tar, 'xf', $tblspc_tars[0], '-C', $repTsDir); |
| 282 | + PostgreSQL::Test::Utils::system_or_bail($tar, 'xf', $tblspc_tars[0], '-C', $repTsDir); |
283 | 283 |
|
284 | 284 | # Update tablespace map to point to new directory.
|
285 | 285 | # XXX Ideally pg_basebackup would handle this.
|
|
0 commit comments