Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4eff1e9

Browse files
committed
Allow recovery tests to run on Windows as an admin user
This is the only test that fails when run as an admin user. The reasonis that when Postgres is started via pg_ctl its admin privileges arelowered. However, this test called 'postgres -D datadir' directly,resulting in a failure. Replace that by calling pg_ctl and then checkingthe result for the expected failure, and the logfile for the expectederror message.
1 parent72c7c4e commit4eff1e9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎src/test/recovery/t/003_recovery_targets.pl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ sub test_recovery_standby
132132
$node_standby->init_from_backup($node_master, 'my_backup', has_restoring => 1);
133133
$node_standby->append_conf('postgresql.conf', "recovery_target_name = '$recovery_name'
134134
recovery_target_time = '$recovery_time'");
135-
command_fails_like(['postgres', '-D',$node_standby->data_dir],
136-
qr/multiple recovery targets specified/,
137-
'multiple conflicting settings');
135+
136+
my$res = run_log(['pg_ctl', '-D',$node_standby->data_dir,
137+
'-l',$node_standby->logfile, 'start']);
138+
ok(!$res, 'invalid recovery startup fails');
139+
140+
my$logfile = slurp_file($node_standby->logfile());
141+
ok ($logfile =~ qr/multiple recovery targets specified/,
142+
'multiple conflicting settings');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp