def test_plugin(self):
     short_plugin_name = 'tomcat'
     plugin_version = '3.9.0'
     full_server_path = os.path.join(self.server_dir, Utils.build_server_dir_name(plugin_version))
     plugin_dir = os.path.join(full_server_path, 'plugins')
     full_plugin_path = os.path.join(plugin_dir, Utils.build_plugin_name(plugin_version, short_plugin_name))
     os.makedirs(plugin_dir)
     open(full_plugin_path, 'w+')
     self.uninstaller.plugin(short_plugin_name, plugin_version, self.server_dir)
     assert not os.makedirs(full_plugin_path)
Beispiel #2
0
    def plugin(self, name, version, location):
        server_dir = os.path.join(location,
                                  Utils.build_server_dir_name(version))
        plugin_path = "{path}/plugins/{name}".format(
            path=server_dir, name=Utils.build_plugin_name(version, name))

        if os.path.isfile(plugin_path):
            os.remove(plugin_path)
        else:
            print "Plugin {} hasn\'t been removed as it doesn\'t exist".format(
                plugin_path)
Beispiel #3
0
 def test_plugin(self):
     short_plugin_name = 'tomcat'
     plugin_version = '3.9.0'
     full_server_path = os.path.join(
         self.server_dir, Utils.build_server_dir_name(plugin_version))
     plugin_dir = os.path.join(full_server_path, 'plugins')
     full_plugin_path = os.path.join(
         plugin_dir,
         Utils.build_plugin_name(plugin_version, short_plugin_name))
     os.makedirs(plugin_dir)
     open(full_plugin_path, 'w+')
     self.uninstaller.plugin(short_plugin_name, plugin_version,
                             self.server_dir)
     assert not os.makedirs(full_plugin_path)