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
This commit is contained in:
Raluca Munteanu
2016-04-20 12:24:48 +00:00
parent e325ad6abd
commit 5cc17a36cd
2 changed files with 24 additions and 1 deletions

View File

@@ -45,6 +45,22 @@ public class PackagingIntegrationTest
updatePackage = new File(pkgName);
}
/**
* Test that the package structure within the update package
* is as expected.
* <p>
* In particular check the following paths exist.
* <ul>
* <li>/lib/alfresco-update-tool.jar</li>
* <li>/apply_updates.sh</li>
* <li>/apply_updates.bat</li>
* <li>/resources/war/alfresco.war</li>
* <li>/resources/war/share.war</li>
* <li>/resources/distribution/common/bin/alfresco-mmt.jar</li>
* <li>/resources/distribution/common/bin/alfresco-spring-encryptor.jar</li>
* <li>/resources/distribution/platform/README.txt</li>
* </ul>
*/
@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<String> pathsToCheck, String expectedPath)

View File

@@ -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
{