From 5cc17a36cd0c23d894aafa3e11136183013c23dd Mon Sep 17 00:00:00 2001 From: Raluca Munteanu Date: Wed, 20 Apr 2016 12:24:48 +0000 Subject: [PATCH] Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125544 mrogers: Integration test javadoc git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/services/full-installer/branches/5.1.N@125614 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../packaging/PackagingIntegrationTest.java | 19 +++++++++++++++++++ .../pkg/test/ZipFormatIntegrationTest.java | 6 +++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/enterprise-update/src/test/java/org/alfresco/update/packaging/PackagingIntegrationTest.java b/enterprise-update/src/test/java/org/alfresco/update/packaging/PackagingIntegrationTest.java index 80031b0b2b..76d016a7db 100644 --- a/enterprise-update/src/test/java/org/alfresco/update/packaging/PackagingIntegrationTest.java +++ b/enterprise-update/src/test/java/org/alfresco/update/packaging/PackagingIntegrationTest.java @@ -45,6 +45,22 @@ public class PackagingIntegrationTest updatePackage = new File(pkgName); } + /** + * Test that the package structure within the update package + * is as expected. + *

+ * In particular check the following paths exist. + *

+ */ @Test public void testPackageStructureIsAsExpected() throws ZipException, IOException { @@ -71,6 +87,9 @@ public class PackagingIntegrationTest assertPathPresent(paths, dirs[0] + "/resources/distribution/common/bin/alfresco-mmt.jar"); assertPathPresent(paths, dirs[0] + "/resources/distribution/common/bin/alfresco-spring-encryptor.jar"); + // Is the readme present ? + assertPathPresent(paths, dirs[0] + "resources/distribution/platform/README.txt"); + } private void assertPathPresent(Set pathsToCheck, String expectedPath) diff --git a/enterprise-update/src/test/java/org/alfresco/update/pkg/test/ZipFormatIntegrationTest.java b/enterprise-update/src/test/java/org/alfresco/update/pkg/test/ZipFormatIntegrationTest.java index 98e514af34..c6df311657 100644 --- a/enterprise-update/src/test/java/org/alfresco/update/pkg/test/ZipFormatIntegrationTest.java +++ b/enterprise-update/src/test/java/org/alfresco/update/pkg/test/ZipFormatIntegrationTest.java @@ -35,7 +35,6 @@ import org.junit.Test; */ public class ZipFormatIntegrationTest extends AbstractIntegrationTest { - File updatePackage; @Before @@ -47,6 +46,11 @@ public class ZipFormatIntegrationTest extends AbstractIntegrationTest updatePackage = new File(pkgName); } + /** + * Check that the apply_updates.sh script exists in the update package and + * that it has 0x755 permissions. In particular the +x bit needs to be + * set. + */ @Test public void applyUpdatesScriptHasExecutableBitsSet() throws FileNotFoundException, ArchiveException, IOException, CompressorException {