Example #1
0
 def test_resolve_plugin_url(self):
     v = {"plugin_custom-analyzer_release_url": "http://example.org/elasticearch/custom-analyzer-{{VERSION}}.zip"}
     s = supplier.PluginDistributionSupplier(repo=supplier.DistributionRepository(name="release",
                                                                                  distribution_config=v,
                                                                                  version="6.3.0"),
                                             plugin=team.PluginDescriptor("custom-analyzer"))
     binaries = {}
     s.add(binaries)
     self.assertDictEqual(binaries, {"custom-analyzer": "http://example.org/elasticearch/custom-analyzer-6.3.0.zip"})
Example #2
0
 def test_resolve_plugin_url(self):
     v = {
         "plugin_custom-analyzer_release_url":
         "http://example.org/elasticearch/custom-analyzer-{{VERSION}}.zip"
     }
     renderer = supplier.TemplateRenderer(version="6.3.0")
     s = supplier.PluginDistributionSupplier(
         repo=supplier.DistributionRepository(name="release",
                                              distribution_config=v,
                                              template_renderer=renderer),
         plugin=team.PluginDescriptor("custom-analyzer"),
     )
     binaries = {}
     s.add(binaries)
     assert binaries == {
         "custom-analyzer":
         "http://example.org/elasticearch/custom-analyzer-6.3.0.zip",
     }