Skip to content

Commit 5df8f57

Browse files
author
avandras
committed
Fix tests failing with newest click
1 parent b8ec927 commit 5df8f57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_ctl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def test_switchover(self):
243243
@patch('patroni.dcs.AbstractDCS.set_failover_value', Mock())
244244
def test_failover(self):
245245
# No candidate specified
246-
result = self.runner.invoke(ctl, ['failover', 'dummy'], input='0\n')
246+
result = self.runner.invoke(ctl, ['failover', 'dummy'], input='0\n\n')
247247
self.assertIn('Failover could be performed only to a specific candidate', result.output)
248248

249249
# Candidate is the same as the leader
@@ -362,15 +362,15 @@ def test_reload(self, mock_post):
362362
@patch('patroni.ctl.request_patroni')
363363
def test_restart_reinit(self, mock_post):
364364
mock_post.return_value.status = 503
365-
result = self.runner.invoke(ctl, ['restart', 'alpha'], input='now\ny\n')
365+
result = self.runner.invoke(ctl, ['restart', 'alpha'], input='now\ny\n\n')
366366
assert 'Failed: restart for' in result.output
367367
assert result.exit_code == 0
368368

369369
result = self.runner.invoke(ctl, ['reinit', 'alpha'], input='y')
370370
assert result.exit_code == 1
371371

372372
# successful reinit
373-
result = self.runner.invoke(ctl, ['reinit', 'alpha', 'other'], input='y\ny')
373+
result = self.runner.invoke(ctl, ['reinit', 'alpha', 'other'], input='y\ny\nn')
374374
assert result.exit_code == 0
375375

376376
# Aborted restart

0 commit comments

Comments
 (0)