Beispiel #1
0
 def test_provide_gnocchi_url_ha_available(self, mock_is_flag_set):
     mock_is_flag_set.side_effect = [True, True]
     mock_gnocchi = mock.MagicMock()
     self.gnocchi_charm.public_url = "http://gnocchi:8041"
     handlers.provide_gnocchi_url(mock_gnocchi)
     mock_gnocchi.set_gnocchi_url.assert_called_once_with(
         "http://gnocchi:8041")
Beispiel #2
0
 def test_provide_gnocchi_url(self, mock_is_flag_set):
     mock_is_flag_set.return_value = False
     mock_gnocchi = mock.MagicMock()
     self.gnocchi_charm.public_url = "http://gnocchi:8041"
     handlers.provide_gnocchi_url(mock_gnocchi)
     mock_gnocchi.set_gnocchi_url.assert_called_once_with(
         "http://gnocchi:8041")
Beispiel #3
0
 def test_provide_gnocchi_url_ha_connected(self, mock_is_flag_set):
     mock_is_flag_set.side_effect = [True, False]
     mock_gnocchi = mock.MagicMock()
     handlers.provide_gnocchi_url(mock_gnocchi)
     mock_gnocchi.set_gnocchi_url.assert_not_called()