Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
postgresql-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PostgreSQL
postgresql-common
Commits
5d0cf93d
Commit
5d0cf93d
authored
2 years ago
by
Christoph Berg
Browse files
Options
Downloads
Patches
Plain Diff
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
2 years ago
Stage: provisioning
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
t/100_upgrade_scripts.t
+7
-1
7 additions, 1 deletion
t/100_upgrade_scripts.t
with
7 additions
and
1 deletion
t/100_upgrade_scripts.t
+
7
−
1
View file @
5d0cf93d
...
@@ -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
"
:
'');
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment