Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 13.58.77.244
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/3/task/3/cwd/proc/2/root/usr/share/postgresql-common/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/3/task/3/cwd/proc/2/root/usr/share/postgresql-common/t//110_integrate_cluster.t
# Check integration of an already existing cluster

use strict; 

use lib 't';
use TestLib;
use File::Temp qw/tempdir/;
use Time::HiRes qw(usleep);

my $version = $MAJORS[-1];

use Test::More tests => 32;
use PgCommon;

delete $ENV{'LANG'};
delete $ENV{'LANGUAGE'};
$ENV{'LC_ALL'} = 'C';

my $wdir = tempdir (CLEANUP => 1);
chmod 0755, $wdir or die "Could not chmod $wdir: $!";

# create clusters for different owners and check their integration
for my $o ('postgres', 'nobody') {
    my $cdir = "$wdir/c";
    mkdir $cdir;
    my $oid = getpwnam $o;
    chown $oid, 0, $cdir or die "Could not chown $cdir to $oid: $!";
    like_program_out $o, "$PgCommon::binroot$version/bin/initdb $cdir/$o", 
	0, qr/Success/, "creating raw initdb cluster for user $o";
    like_program_out 0, "pg_createcluster $version $o -d $cdir/$o", 0, 
	qr/Configuring already existing cluster/i, "integrating $o cluster";
    like_program_out 0, "pg_lsclusters", 0,
	qr/$version\s+$o\s+5432\s+down\s+$o\s/, 'correct pg_lsclusters output';
    is_program_out $o, "pg_ctlcluster $version $o start", 0, '', "starting cluster $o";
    like_program_out 0, "pg_lsclusters", 0,
	qr/$version\s+$o\s+5432\s+online\s+$o\s/, 'correct pg_lsclusters output';
    is ((system "pg_dropcluster $version $o --stop"), 0, "dropping cluster $o");
    ok_dir $cdir, [], 'No files in temporary cluster dir left behind';
    rmdir $cdir;
}

check_clean;

# vim: filetype=perl

Anon7 - 2022
AnonSec Team