Don't pass around is_paused to sync_replication_slots (#2963)

Oversight of #2935
This commit is contained in:
Alexander Kukushkin
2023-11-28 08:37:22 +01:00
committed by GitHub
parent 36e3dfbe41
commit 9afaf6eb51
3 changed files with 7 additions and 9 deletions
+2 -1
View File
@@ -52,9 +52,10 @@ class TestSlotsHandler(BaseTestPostgresql):
mock_debug.assert_called_once()
self.p.set_role('replica')
with patch.object(Postgresql, 'is_primary', Mock(return_value=False)), \
patch.object(global_config.__class__, 'is_paused', PropertyMock(return_value=True)), \
patch.object(SlotsHandler, 'drop_replication_slot') as mock_drop:
config.data['slots'].pop('ls')
self.s.sync_replication_slots(cluster, False, paused=True)
self.s.sync_replication_slots(cluster, False)
mock_drop.assert_not_called()
self.p.set_role('primary')
with mock.patch('patroni.postgresql.Postgresql.role', new_callable=PropertyMock(return_value='replica')):