Server IP : 127.0.0.2 / Your IP : 52.14.154.79 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/postgresql-common/t/ |
Upload File : |
use strict; use lib 't'; use TestLib; use PgCommon; use Test::More tests => 21; my $v = $MAJORS[-1]; # create cluster ok ((system "pg_createcluster $v main --start >/dev/null") == 0, "pg_createcluster $v main"); # test pg_renamecluster with a running cluster program_ok (0, "pg_renamecluster $v main donau"); is_program_out 'postgres', 'psql -tAc "show data_directory"', 0, "/var/lib/postgresql/$v/donau\n", 'cluster is running and data_directory was moved'; is ((PgCommon::get_conf_value $v, 'donau', 'postgresql.conf', 'hba_file'), "/etc/postgresql/$v/donau/pg_hba.conf", 'pg_hba.conf location updated'); is ((PgCommon::get_conf_value $v, 'donau', 'postgresql.conf', 'ident_file'), "/etc/postgresql/$v/donau/pg_ident.conf", 'pg_ident.conf location updated'); is ((PgCommon::get_conf_value $v, 'donau', 'postgresql.conf', 'external_pid_file'), "/var/run/postgresql/$v-donau.pid", 'external_pid_file location updated'); ok (-f "/var/run/postgresql/$v-donau.pid", 'external_pid_file exists'); is ((PgCommon::get_conf_value $v, 'donau', 'postgresql.conf', 'stats_temp_directory'), "/var/run/postgresql/$v-donau.pg_stat_tmp", 'stats_temp_directory location updated'); ok (-d "/var/run/postgresql/$v-donau.pg_stat_tmp", 'stats_temp_directory exists'); # stop server, clean up, check for leftovers ok ((system "pg_dropcluster $v donau --stop") == 0, 'pg_dropcluster removes cluster'); check_clean; # vim: filetype=perl