def test_postgresql_db_changed_missing_relation_data(
         self, configs, mock_ensure_leader, mock_log):
     mock_ensure_leader.return_value = False
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = []
     hooks.pgsql_db_changed()
     self.log.assert_called_with(
         'pgsql-db relation incomplete. Peer not ready?')
Exemplo n.º 2
0
 def test_postgresql_db_changed_missing_relation_data(self, configs,
                                                      mock_ensure_leader,
                                                      mock_log):
     mock_ensure_leader.return_value = False
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = []
     hooks.pgsql_db_changed()
     self.log.assert_called_with(
         'pgsql-db relation incomplete. Peer not ready?'
     )
Exemplo n.º 3
0
 def _postgresql_db_test(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['pgsql-db']
     configs.write = MagicMock()
     hooks.pgsql_db_changed()
Exemplo n.º 4
0
 def _postgresql_db_test(self, configs):
     configs.complete_contexts = MagicMock()
     configs.complete_contexts.return_value = ['pgsql-db']
     configs.write = MagicMock()
     hooks.pgsql_db_changed()