Exemplo n.º 1
0
    def test_get_url_https(self):
        plugin = {
            'source': 'https://google.com',
            'install_arguments': '--pre'
        }
        url = operations.get_plugin_source(plugin)
        args = operations.get_plugin_args(plugin)

        self.assertEqual(url, 'https://google.com')
        self.assertEqual(args, '--pre')
Exemplo n.º 2
0
 def test_get_plugin_source_from_blueprints_dir(self):
     plugin = {
         'source': 'plugin-dir-name'
     }
     with utils.env(constants.MANAGER_FILE_SERVER_BLUEPRINTS_ROOT_URL_KEY,
                    'localhost'):
         source = operations.get_plugin_source(
             plugin,
             blueprint_id='blueprint_id')
     self.assertEqual(
         'localhost/blueprint_id/plugins/plugin-dir-name.zip',
         source)
Exemplo n.º 3
0
 def test_get_url_and_args_http_no_args(self):
     plugin = {'source': 'http://google.com'}
     url = operations.get_plugin_source(plugin)
     args = operations.get_plugin_args(plugin)
     self.assertEqual(url, 'http://google.com')
     self.assertEqual(args, '')