mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +03:00
Make sure to run one initdb TAP test with no TZ set
That way we make sure that initdb's time zone setting code is exercised. This doesn't add an extra test, it just alters an existing test. Discussion: <https://postgr.es/m/5807.1492229253@sss.pgh.pa.us>
This commit is contained in:
parent
a74740fbd3
commit
033b969edd
@ -34,8 +34,16 @@ command_fails(
|
||||
'role names cannot begin with "pg_"');
|
||||
|
||||
mkdir $datadir;
|
||||
command_ok([ 'initdb', '-N', '-T', 'german', '-X', $xlogdir, $datadir ],
|
||||
'successful creation');
|
||||
|
||||
# make sure we run one successful test without a TZ setting so we test
|
||||
# initdb's time zone setting code
|
||||
{
|
||||
# delete local only works from perl 5.12, so use the older way to do this
|
||||
local (%ENV) = %ENV;
|
||||
delete $ENV{TZ};
|
||||
|
||||
command_ok([ 'initdb', '-N', '-T', 'german', '-X', $xlogdir, $datadir ],
|
||||
'successful creation');
|
||||
}
|
||||
command_ok([ 'initdb', '-S', $datadir ], 'sync only');
|
||||
command_fails([ 'initdb', $datadir ], 'existing data directory');
|
||||
|
Loading…
x
Reference in New Issue
Block a user