Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
839acf94
Commit
839acf94
authored
Sep 13, 2014
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pg_ctl: Add tests for behavior with nonexistent data directory
This behavior was made more precise in commit
11d205e2
.
parent
95c38a98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
src/bin/pg_ctl/t/001_start_stop.pl
src/bin/pg_ctl/t/001_start_stop.pl
+4
-1
src/bin/pg_ctl/t/002_status.pl
src/bin/pg_ctl/t/002_status.pl
+4
-1
No files found.
src/bin/pg_ctl/t/001_start_stop.pl
View file @
839acf94
use
strict
;
use
warnings
;
use
TestLib
;
use
Test::
More
tests
=>
1
0
;
use
Test::
More
tests
=>
1
1
;
my
$tempdir
=
TestLib::
tempdir
;
my
$tempdir_short
=
TestLib::
tempdir_short
;
...
...
@@ -10,6 +10,9 @@ program_help_ok('pg_ctl');
program_version_ok
('
pg_ctl
');
program_options_handling_ok
('
pg_ctl
');
command_exit_is
([
'
pg_ctl
',
'
start
',
'
-D
',
"
$tempdir
/nonexistent
"
],
1
,
'
pg_ctl start with nonexistent directory
');
command_ok
([
'
pg_ctl
',
'
initdb
',
'
-D
',
"
$tempdir
/data
"
],
'
pg_ctl initdb
');
open
CONF
,
"
>>
$tempdir
/data/postgresql.conf
";
print
CONF
"
listen_addresses = ''
\n
";
...
...
src/bin/pg_ctl/t/002_status.pl
View file @
839acf94
use
strict
;
use
warnings
;
use
TestLib
;
use
Test::
More
tests
=>
2
;
use
Test::
More
tests
=>
3
;
my
$tempdir
=
TestLib::
tempdir
;
my
$tempdir_short
=
TestLib::
tempdir_short
;
command_exit_is
([
'
pg_ctl
',
'
status
',
'
-D
',
"
$tempdir
/nonexistent
"
],
4
,
'
pg_ctl status with nonexistent directory
');
system_or_bail
"
initdb -D '
$tempdir
'/data -A trust >/dev/null
";
open
CONF
,
"
>>
$tempdir
/data/postgresql.conf
";
print
CONF
"
listen_addresses = ''
\n
";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment