mmt.setVerbose(verbose);
if (OPTION_VERBOSE.equals(option) == true) manager.setVerbose(true); manager.setVerbose(true); manager.setVerbose(true); manager.setVerbose(true); manager.uninstallModule(moduleId, warLocation,preview, purge); System.exit(SUCCESS_EXIT_CODE);
public void testWhiteSpaceInCustomMapping() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v3.amp"); // Initial install of module this.manager.installModule(ampLocation, warLocation, false, false, true); List<String> files = new ArrayList<String>(10); files.add("/WEB-INF/classes/alfresco/module/test/module.properties"); files.add("/WEB-INF/classes/alfresco/module/test/modifications.install"); files.add("/WEB-INF/lib/test.jar"); files.add("/WEB-INF/classes/alfresco/module/test/module-context.xml"); files.add("/images/test.jpg"); files.add("/css/test.css"); files.add("/extra.txt"); checkForFileExistance(warLocation, files); }
if (OPTION_VERBOSE.equals(option) == true) manager.setVerbose(true); manager.setVerbose(true); manager.setVerbose(true); manager.setVerbose(true); manager.uninstallModule(moduleId, warLocation,preview, purge); System.exit(SUCCESS_EXIT_CODE);
public void testPreviewInstall() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v1.amp"); // Initial install of module this.manager.installModule(ampLocation, warLocation, true, false, true); // TODO need to prove that the war file has not been updated in any way }
public void testUninstall() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v1.amp"); // Initial install of module this.manager.installModule(ampLocation, warLocation, false, false, false); this.manager.listModules(warLocation); this.manager.uninstallModule("test", warLocation, false, false); List<String> files = new ArrayList<String>(10); files.add("/WEB-INF/classes/alfresco/module/test/module.properties"); files.add("/WEB-INF/classes/alfresco/module/test/modifications.install"); files.add("/WEB-INF/lib/test.jar"); files.add("/WEB-INF/classes/alfresco/module/test/module-context.xml"); checkForFileNonExistance(warLocation, files); }
public void testInstallFromDir() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v1.amp"); String ampV2Location = getFileLocation(".amp", "module/test_v2.amp"); int index = ampV2Location.lastIndexOf(File.separator); System.out.println(index); String directoryLocation = ampV2Location.substring(0, index); try { this.manager.installModules(directoryLocation, warLocation); } catch (ModuleManagementToolException exception) { exception.printStackTrace(); System.out.println("Expected failure: " + exception.getMessage()); } }
public void testBasicInstall() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); String ampLocation = getFileLocation(".amp", "module/test_v1.amp"); String ampV2Location = getFileLocation(".amp", "module/test_v2.amp"); installerSharedTests(warLocation, ampLocation, ampV2Location); }
mmt.setVerbose(false);
public void testExistingFilesInWar() throws Exception { manager.setVerbose(true); String warLocation = getFileLocation(".war", "module/test.war"); //Version 4.0.1 String ampLocation = getFileLocation(".amp", "module/test_v4.amp"); try { this.manager.installModule(ampLocation, warLocation, false, false, true); } catch(ModuleManagementToolException exception) { assertTrue(exception.getMessage().contains("will overwrite an existing file in the war")); } this.manager.installModule(ampLocation, warLocation, false, true, true); //Now force it checkContentsOfFile(warLocation + "/jsp/relogin.jsp", "VERSIONONE"); checkContentsOfFile(warLocation + "/css/main.css", "p{margin-bottom:1em;}"); this.manager.installModule(ampLocation, warLocation, false, true, false); //install it again }
public void testDependencySuccess() throws Exception manager.setVerbose(true);
public void testForcedInstall() throws Exception manager.setVerbose(true);
public void testBasicFolderInstall() throws Exception { manager.setVerbose(true); String warDirectory = extractToDir(".war", "module/test.war"); String ampDirectory = extractToDir(".amp", "module/test_v1.amp"); String ampV2Directory = getFileLocation(".amp", "module/test_v2.amp"); assertNotNull(warDirectory); assertNotNull(ampDirectory); assertNotNull(ampV2Directory); installerSharedTests(warDirectory, ampDirectory, ampV2Directory); //Now try it on share warDirectory = extractToDir(".war", "module/share-3.4.11.war"); assertNotNull(warDirectory); assertNotNull(ampDirectory); this.manager.installModule(ampDirectory, warDirectory); warDirectory = extractToDir(".war", "module/share-4.2.a.war"); assertNotNull(warDirectory); String ampV2Location = getFileLocation(".amp", "module/test_v6.amp"); this.manager.installModule(ampV2Location, warDirectory); }