Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

106705: Made findManifest and backup public so they can be reused. UTF-77


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@106796 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-06-23 07:07:20 +00:00
parent 6e3fb93759
commit 70f7e4cf7c
5 changed files with 105 additions and 37 deletions

View File

@@ -17,6 +17,7 @@ import org.springframework.util.FileCopyUtils;
import java.io.*;
import java.util.List;
import java.util.Properties;
import java.util.jar.Manifest;
import static org.junit.Assert.*;
@@ -290,6 +291,25 @@ public class WarHelperImplTest extends WarHelperImpl
}
@Test
public void testfindManifest() throws Exception {
//Now check the compatible versions using the manifest
TFile theWar = getFile(".war", "module/share-3.4.11.war");
Manifest manifest = this.findManifest(theWar);
assertNotNull(manifest);
assertEquals("Alfresco Share Enterprise", manifest.getMainAttributes().getValue(MANIFEST_IMPLEMENTATION_TITLE));
assertEquals("3.4.11", manifest.getMainAttributes().getValue(MANIFEST_SPECIFICATION_VERSION));
theWar = getFile(".war", "module/alfresco-4.2.a.war");
manifest = this.findManifest(theWar);
assertNotNull(manifest);
assertEquals("Alfresco Repository Community", manifest.getMainAttributes().getValue(MANIFEST_IMPLEMENTATION_TITLE));
assertEquals("4.2.a", manifest.getMainAttributes().getValue(MANIFEST_SPECIFICATION_VERSION));
}
@Test
public void testListModules() throws Exception
{