Skip to content
Snippets Groups Projects
Commit 5d0cf93d authored by Christoph Berg's avatar Christoph Berg :satellite:
Browse files

t/100_upgrade_scripts.t: Spray more debugging output

parent 10b83f16
Branches debug
No related tags found
No related merge requests found
Pipeline #413096 passed
...@@ -7,7 +7,7 @@ use TestLib; ...@@ -7,7 +7,7 @@ use TestLib;
my @versions = ($MAJORS[-1]); my @versions = ($MAJORS[-1]);
use Test::More tests => 29; use Test::More tests => 31;
use PgCommon; use PgCommon;
$ENV{DEBUG_NEXT_FREE_PORT} = 1; $ENV{DEBUG_NEXT_FREE_PORT} = 1;
...@@ -19,6 +19,8 @@ if ($ENV{LD_PRELOAD} and $ENV{LD_PRELOAD} =~ /eatmydata/) { ...@@ -19,6 +19,8 @@ if ($ENV{LD_PRELOAD} and $ENV{LD_PRELOAD} =~ /eatmydata/) {
split (/\s+/, $ENV{LD_PRELOAD})); split (/\s+/, $ENV{LD_PRELOAD}));
} }
$ENV{DEBUG_NEXT_FREE_PORT} = 1;
my $shellaction = '#!/bin/sh my $shellaction = '#!/bin/sh
S=`basename $0` S=`basename $0`
SQL="INSERT INTO log VALUES (\'$S $1 $2 $3\')" SQL="INSERT INTO log VALUES (\'$S $1 $2 $3\')"
...@@ -45,6 +47,10 @@ my %test_sql_scripts = ( ...@@ -45,6 +47,10 @@ my %test_sql_scripts = (
# create clusters # create clusters
foreach my $v (@versions) { foreach my $v (@versions) {
system "ss --no-header -ap 'sport >= 5432 and sport <= 5439'" if exists $ENV{DEBUG_NEXT_FREE_PORT};
is next_free_port, 5432, "next free port is 5432";
sleep 5;
is next_free_port, 5432, "next free port is 5432";
is ((system "pg_createcluster $v main --start >/dev/null"), 0, "pg_createcluster $v main"); is ((system "pg_createcluster $v main --start >/dev/null"), 0, "pg_createcluster $v main");
like_program_out 'postgres', 'pg_lsclusters -h', 0, qr/$v\s*main.*5432.*online/, 'cluster was created'; like_program_out 'postgres', 'pg_lsclusters -h', 0, qr/$v\s*main.*5432.*online/, 'cluster was created';
is_program_out 'postgres', "createdb --cluster $v/main db1", 0, ($v < 8.3 ? "CREATE DATABASE\n" : ''); is_program_out 'postgres', "createdb --cluster $v/main db1", 0, ($v < 8.3 ? "CREATE DATABASE\n" : '');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment