Server IP : 127.0.0.2 / Your IP : 3.145.146.15 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 : |
# We try to call psql with --version and then on localhost. Since there are no # clusters, we expect an error message that the connection to port 5432 is # refused. This checks that pg_wrapper correctly picks the default port and # uses the highest available version. use strict; use Test::More tests => 14; use lib 't'; use TestLib; like_program_out 0, 'psql --version', 0, qr/^psql \(PostgreSQL\) $ALL_MAJORS[-1]/, 'pg_wrapper selects highest available version number'; like_program_out 0, 'env LC_MESSAGES=C psql -h 127.0.0.1 -l', 2, qr/could not connect/, 'connecting to localhost fails with no clusters'; # We check if PGCLUSTER, --cluster, and native psql options are evaluated with # correct priority. (This is related to the checks in t/090_multicluster.t, but # easier to do here because no clusters are running.) like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql -l", 2, qr/could not connect.*127.0.0.2.*on port 5431/s, 'pg_wrapper uses host and port from PGCLUSTER'; like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql --cluster $MAJORS[-1]/127.0.0.3:5430 -l", 2, qr/could not connect.*127.0.0.3.*on port 5430/s, 'pg_wrapper uses --cluster from the command line'; like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql -h 127.0.0.3 -l", 2, qr/could not connect.*127.0.0.3.*on port 5432/s, 'pg_wrapper ignores PGCLUSTER with -h on the command line'; like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 psql --host 127.0.0.3 -l", 2, qr/could not connect.*127.0.0.3.*on port 5432/s, 'pg_wrapper ignores PGCLUSTER with --host on the command line'; like_program_out 0, "env LC_MESSAGES=C PGCLUSTER=$MAJORS[-1]/127.0.0.2:5431 PGHOST=127.0.0.3 psql -l", 2, qr/could not connect.*127.0.0.3.*on port 5432/s, 'pg_wrapper ignores PGCLUSTER if PGHOST is set'; # vim: filetype=perl