Skip to content

Commit

Permalink
Revert a misdirected test change
Browse files Browse the repository at this point in the history
  • Loading branch information
András Váczi committed Jan 6, 2025
1 parent 953a616 commit ee3d51d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/test_ctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ def test_output_members(self):
with click.Context(click.Command('list')) as ctx:
ctx.obj = {'__config': {}, '__mpp': get_mpp({})}
scheduled_at = datetime.now(tzutc) + timedelta(seconds=600)
target_site = 'baz'
cluster = get_cluster_initialized_with_leader(Failover(1, 'foo', 'bar', scheduled_at, target_site))
cluster = get_cluster_initialized_with_leader(Failover(1, 'foo', 'bar', scheduled_at))
del cluster.members[1].data['conn_url']
for fmt in ('pretty', 'json', 'yaml', 'topology'):
self.assertIsNone(output_members(cluster, name='abc', fmt=fmt))
Expand Down Expand Up @@ -556,10 +555,8 @@ def test_flush_switchover(self):
assert 'No pending scheduled switchover' in result.output

scheduled_at = datetime.now(tzutc) + timedelta(seconds=600)
target_site = 'baz'
with patch('patroni.dcs.AbstractDCS.get_cluster',
Mock(return_value=get_cluster_initialized_with_leader(Failover(1, 'a', 'b', scheduled_at,
target_site)))):
Mock(return_value=get_cluster_initialized_with_leader(Failover(1, 'a', 'b', scheduled_at)))):
result = self.runner.invoke(ctl, ['-k', 'flush', 'dummy', 'switchover'])
assert result.output.startswith('Success: ')

Expand Down

0 comments on commit ee3d51d

Please sign in to comment.