def test_image_service_joined_specified_interface(self, _canonical_url):
     _canonical_url.return_value = 'http://glancehost'
     relations.image_service_joined(relation_id='image-service:1')
     args = {
         'glance-api-server': 'http://glancehost:9292',
         'relation_id': 'image-service:1',
     }
     self.relation_set.assert_called_with(**args)
 def test_image_service_joined_leader(self, _canonical_url):
     _canonical_url.return_value = 'http://glancehost'
     relations.image_service_joined()
     args = {
         'glance-api-server': 'http://glancehost:9292',
         'relation_id': None
     }
     self.relation_set.assert_called_with(**args)
Beispiel #3
0
 def test_image_service_joined_specified_interface(self, _canonical_url):
     _canonical_url.return_value = 'http://glancehost'
     relations.image_service_joined(relation_id='image-service:1')
     args = {
         'glance-api-ready': 'no',
         'glance-api-server': 'http://glancehost:9292',
         'relation_id': 'image-service:1',
     }
     self.relation_set.assert_called_with(**args)
Beispiel #4
0
 def test_image_service_joined_leader(self, _canonical_url, _api_ready):
     _api_ready.return_value = True
     _canonical_url.return_value = 'http://glancehost'
     relations.image_service_joined()
     args = {
         'glance-api-ready': 'yes',
         'glance-api-server': 'http://glancehost:9292',
         'relation_id': None
     }
     self.relation_set.assert_called_with(**args)