Author: chris.laprun(a)jboss.com
Date: 2009-01-31 14:08:32 -0500 (Sat, 31 Jan 2009)
New Revision: 12754
Added:
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/NodeUtilTestCase.java
modules/cms/trunk/cms-jackrabbit/src/test/resources/jcr/bad_cms.zip
Modified:
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/FolderImpl.java
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/jcr/command/StoreArchiveCommand.java
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java
modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml
Log:
- Minor improvement to StoreArchiveCommand.
- Fixed tests
Modified:
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/FolderImpl.java
===================================================================
---
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/FolderImpl.java 2009-01-31
16:32:09 UTC (rev 12753)
+++
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/FolderImpl.java 2009-01-31
19:08:32 UTC (rev 12754)
@@ -53,5 +53,11 @@
{
this.files = files;
}
+
+ @Override
+ public String toString()
+ {
+ return "Folder " + getBasePath();
+ }
}
Modified:
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/jcr/command/StoreArchiveCommand.java
===================================================================
---
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/jcr/command/StoreArchiveCommand.java 2009-01-31
16:32:09 UTC (rev 12753)
+++
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/impl/jcr/command/StoreArchiveCommand.java 2009-01-31
19:08:32 UTC (rev 12754)
@@ -37,13 +37,12 @@
import java.io.File;
import java.io.FileOutputStream;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Date;
import java.util.Enumeration;
import java.util.Locale;
import java.util.StringTokenizer;
-import java.util.regex.Pattern;
/**
* Saves an uploaded archive to the repo.
@@ -56,7 +55,7 @@
/** The serialVersionUID */
private static final long serialVersionUID = 1568453649437987499L;
private static Logger log = Logger.getLogger(StoreArchiveCommand.class);
-
+
String msRootPath;
byte[] archiveBytes;
String msLanguage;
@@ -89,32 +88,24 @@
{
zipEntry = (ZipEntry)entries.nextElement();
- if (!zipEntry.isDirectory())
+ String itemName = zipEntry.getName();
+ if (!NodeUtil.CHECK_FOR_XSS_PATTERN.matcher(itemName).matches())
{
- String itemName = zipEntry.getName();
- if(!NodeUtil.CHECK_FOR_XSS_PATTERN.matcher(itemName).matches())
+ log.info("Zip file: '" + itemName + "' is not a
valid file name. It will be skipped.");
+ }
+ else
+ {
+ if (!zipEntry.isDirectory())
{
- log.info("Zip file: '" + itemName + "' is not a
valid file name. It will be skipped.");
+ this.addFile(zipFile, zipEntry);
}
- else
+ else // isDirectory
{
- this.addFile(zipFile, zipEntry);
+ this.addFolder(zipEntry);
}
}
- else // isDirectory
- {
- String itemName = zipEntry.getName();
- if(!NodeUtil.CHECK_FOR_XSS_PATTERN.matcher(itemName).matches())
- {
- log.info("Zip file: '" + itemName + "' is not a
valid file name. It will be skipped.");
- }
- else
- {
- this.addFolder(zipEntry);
- }
- }
}
-
+
return null;
}
catch (Exception e)
@@ -129,9 +120,8 @@
}
}
}
-
+
/**
- *
* @param zipFile
* @param zipEntry
* @throws IOException
@@ -145,18 +135,18 @@
byte[] zipBytes = new byte[(int)fileSize];
InputStream zipDataStream = zipFile.getInputStream(zipEntry);
long bytesRead = 0;
-
+
while (bytesRead < fileSize)
{
bytesRead += zipDataStream.read(zipBytes, (int)bytesRead, (int)(fileSize -
bytesRead));
}
-
+
org.jboss.portal.cms.model.File file = new FileImpl();
-
+
String sBasePath = FileUtil.cleanDoubleSlashes("/" + this.msRootPath +
"/" + itemName);
sBasePath = FileUtil.cleanDoubleSlashes(sBasePath); // hackish, but necessary
for root path uploads.
file.setBasePath(sBasePath);
-
+
Content content = new ContentImpl();
content.setEncoding("UTF-8");
content.setTitle(itemName);
@@ -164,7 +154,7 @@
content.setBasePath(sBasePath + "/" + this.msLanguage);
content.setBytes(zipBytes);
file.setContent(new Locale(this.msLanguage), content);
-
+
//Store the file
JCRCommand nodeExists =
(JCRCommand)context.getCommandFactory().createItemExistsCommand(file.getBasePath());
Boolean bExists = (Boolean)context.execute(nodeExists);
@@ -182,25 +172,25 @@
context.execute(updateFile);
}
}
- catch(CMSException e)
+ catch (CMSException e)
{
//Log the error, but don't fail creation of other resources in the archive
log.error(this, e);
}
}
-
+
private void addFolder(ZipEntry zipEntry)
{
try
{
String itemName = zipEntry.getName();
-
+
//trim trailing slash.
if (itemName.endsWith("/"))
{
itemName = itemName.substring(0, itemName.length() - 1);
}
-
+
if (!"".equals(itemName))
{
String sBasePath = FileUtil.cleanDoubleSlashes("/" +
this.msRootPath + "/" + itemName);
@@ -212,7 +202,7 @@
{
this.createParentHierarchy(sParentPath);
}
-
+
JCRCommand nodeExists2 =
(JCRCommand)context.getCommandFactory().createItemExistsCommand(sBasePath);
Boolean bExists2 = (Boolean)context.execute(nodeExists2);
if (!bExists2.booleanValue())
@@ -223,13 +213,13 @@
folder.setTitle(itemName);
folder.setLastModified(new Date());
folder.setBasePath(sBasePath);
-
+
JCRCommand folderSave =
(JCRCommand)context.getCommandFactory().createFolderSaveCommand(folder);
context.execute(folderSave);
}
}
}
- catch(Exception e)
+ catch (Exception e)
{
//Log the error, but don't fail creation of other resources in the archive
log.error(this, e);
Added:
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/NodeUtilTestCase.java
===================================================================
---
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/NodeUtilTestCase.java
(rev 0)
+++
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/NodeUtilTestCase.java 2009-01-31
19:08:32 UTC (rev 12754)
@@ -0,0 +1,44 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.jboss.portal.cms.test;
+
+import junit.framework.TestCase;
+import org.jboss.portal.cms.util.NodeUtil;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ */
+public class NodeUtilTestCase extends TestCase
+{
+ public void testIsValidPath()
+ {
+ assertFalse(NodeUtil.isValidPath("/"));
+ assertFalse(NodeUtil.isValidPath("//"));
+ assertFalse(NodeUtil.isValidPath("/<body
onload=alert(String.fromCharCode(88,83,83))>"));
+ assertFalse(NodeUtil.isValidPath("/foo/<body
onload=alert(String.fromCharCode(88,83,83))>"));
+ assertFalse(NodeUtil.isValidPath(""));
+
+ assertTrue(NodeUtil.isValidPath("/foo/bar"));
+ }
+}
Modified:
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java
===================================================================
---
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java 2009-01-31
16:32:09 UTC (rev 12753)
+++
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileArchiveUpload.java 2009-01-31
19:08:32 UTC (rev 12754)
@@ -24,14 +24,13 @@
import org.jboss.portal.cms.CMSException;
import org.jboss.portal.cms.Command;
-import org.jboss.portal.cms.model.Folder;
import org.jboss.portal.cms.model.File;
+import org.jboss.portal.cms.model.Folder;
import org.jboss.portal.common.io.IOTools;
+import static org.jboss.unit.api.Assert.assertEquals;
import org.jboss.unit.api.pojo.annotations.Test;
import org.jboss.unit.mc.api.annotations.Bootstrap;
-import static org.jboss.unit.api.Assert.*;
-
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
@@ -47,9 +46,9 @@
public class TestFileArchiveUpload extends AbstractCommandTestCase
{
/**
- *
+ *
*/
- private String sZipFile = "jcr/ziptest.zip";
+ private String sZipFile = "jcr/ziptest.zip";
/**
*
@@ -65,7 +64,7 @@
//create archive
this.runArchive(this.sZipFile);
this.assertArchiveUploadCreate();
-
+
//update archive
this.runArchive(this.sZipFile);
this.assertArchiveUploadUpdate();
@@ -80,7 +79,7 @@
Folder whopper = (Folder)service.execute(listCMD);
List folders = whopper.getFolders();
List files = whopper.getFiles();
- assertEquals("Folder Size incorrect", folders.size(), 0);
+ assertEquals("Folder Size incorrect", folders.size(), 1); // we always
have /default
assertEquals("File Size incorrect", files.size(), 0);
}
@@ -96,7 +95,7 @@
assertEquals("Folder Size incorrect", folders.size(), 0);
assertEquals("File Size incorrect", files.size(), 2);
}
-
+
private void runArchive(String sZipFile) throws IOException
{
service.setDefaultLocale(Locale.ENGLISH.getLanguage());
@@ -110,13 +109,13 @@
}
finally
{
- if(is != null)
+ if (is != null)
{
is.close();
}
}
}
-
+
private void assertArchiveUploadCreate()
{
//retrieve list
@@ -134,27 +133,27 @@
List files2 = whopper2.getFiles();
assertEquals("Folder Size incorrect", folders2.size(), 0);
assertEquals("File Size incorrect", files2.size(), 1);
-
+
//Look for single versions of files
- for(int i=0; i<files.size(); i++)
+ for (int i = 0; i < files.size(); i++)
{
File file = (File)files.get(i);
-
- Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath()+"/en");
+
+ Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath() +
"/en");
List versions = (List)service.execute(versionsCMD);
- assertEquals("Multiple Versions not Found", versions.size(), 1);
+ assertEquals("Multiple Versions not Found", versions.size(), 1);
}
-
- for(int i=0; i<files2.size(); i++)
+
+ for (int i = 0; i < files2.size(); i++)
{
File file = (File)files2.get(i);
-
- Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath()+"/en");
+
+ Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath() +
"/en");
List versions = (List)service.execute(versionsCMD);
- assertEquals("Multiple Versions not Found", versions.size(), 1);
+ assertEquals("Multiple Versions not Found", versions.size(), 1);
}
}
-
+
private void assertArchiveUploadUpdate()
{
//retrieve list
@@ -172,24 +171,24 @@
List files2 = whopper2.getFiles();
assertEquals("Folder Size incorrect", folders2.size(), 0);
assertEquals("File Size incorrect", files2.size(), 1);
-
+
//Look for multiple versions of files
- for(int i=0; i<files.size(); i++)
+ for (int i = 0; i < files.size(); i++)
{
File file = (File)files.get(i);
-
- Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath()+"/en");
+
+ Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath() +
"/en");
List versions = (List)service.execute(versionsCMD);
- assertEquals("Multiple Versions not Found", versions.size(), 2);
+ assertEquals("Multiple Versions not Found", versions.size(), 2);
}
-
- for(int i=0; i<files2.size(); i++)
+
+ for (int i = 0; i < files2.size(); i++)
{
File file = (File)files2.get(i);
-
- Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath()+"/en");
+
+ Command versionsCMD =
service.getCommandFactory().createContentGetVersionsCommand(file.getBasePath() +
"/en");
List versions = (List)service.execute(versionsCMD);
- assertEquals("Multiple Versions not Found", versions.size(), 2);
+ assertEquals("Multiple Versions not Found", versions.size(), 2);
}
}
}
Modified:
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java
===================================================================
---
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java 2009-01-31
16:32:09 UTC (rev 12753)
+++
modules/cms/trunk/cms-jackrabbit/src/test/java/org/jboss/portal/cms/test/commands/TestFileCreate.java 2009-01-31
19:08:32 UTC (rev 12754)
@@ -30,11 +30,10 @@
import org.jboss.portal.cms.model.File;
import org.jboss.portal.cms.util.NodeUtil;
import org.jboss.portal.cms.util.RepositoryUtil;
+import static org.jboss.unit.api.Assert.*;
import org.jboss.unit.api.pojo.annotations.Test;
import org.jboss.unit.mc.api.annotations.Bootstrap;
-import static org.jboss.unit.api.Assert.*;
-
import javax.jcr.Node;
import javax.jcr.Session;
import java.util.Locale;
@@ -49,11 +48,11 @@
public class TestFileCreate extends AbstractCommandTestCase
{
/**
- *
+ *
*/
private String sFilePath = "/testdoc.gif";
-
+
/**
*
*
@@ -61,8 +60,8 @@
public TestFileCreate()
{
}
-
+
/**
*
*
@@ -139,27 +138,27 @@
session.logout();
}
-
+
@Test
public void testRootFileCreate() throws Exception
- {
+ {
try
{
this.fileCreate("/");
}
- catch(CMSException e)
+ catch (CMSException e)
{
- String message = e.getMessage();
- assertTrue("Invalid Path Not Validated", message.contains("Path:
/ is invalid"));
+ String message = e.getMessage();
+ assertTrue("Invalid Path Not Validated", message.contains("Path:
/ is not a legal path element."));
}
}
-
+
@Test
public void testRecursiveFileCreate() throws Exception
- {
+ {
//Create a legal file
this.fileCreate("/level-1/blah");
-
+
//Assert
Command fileGet =
service.getCommandFactory().createFileGetCommand("/level-1/blah",
Locale.ENGLISH);
File cour = (File)service.execute(fileGet);
@@ -171,56 +170,53 @@
{
this.fileCreate("/level-1/blah/blah2");
}
- catch(CMSException e)
+ catch (CMSException e)
{
- String message = e.getMessage();
+ String message = e.getMessage();
assertTrue("Invalid Parent Hierarchy Not Validated",
message.contains("Trying to create a Folder inside a File"));
}
-
+
//Try to create a file way down the path hierarchy
this.fileCreate("/level-1/level-2/level-3/blah");
-
+
//Assert
fileGet =
service.getCommandFactory().createFileGetCommand("/level-1/level-2/level-3/blah",
Locale.ENGLISH);
cour = (File)service.execute(fileGet);
assertNotNull("File was not created", cour);
assertEquals("Content Incorrect", new
String(cour.getContent().getBytes()), "1234567890");
}
-
+
@Test
public void testEmptyFileCreate() throws Exception
- {
- String path = "/emptyfile.gif";
-
- //create file english
- File file = new FileImpl();
- file.setBasePath(path);
+ {
+ String path = "/emptyfile.gif";
- Content content = new ContentImpl();
- content.setEncoding("UTF-8");
- content.setTitle("English Title");
- content.setDescription("English Description");
- content.setBasePath(path + "/" + Locale.ENGLISH.getLanguage());
- content.setBytes("".getBytes());
- content.setMimeType("image/gif");
- file.setContent(Locale.ENGLISH, content);
-
- Command createFileCMD = service.getCommandFactory().createNewFileCommand(file,
content);
- service.execute(createFileCMD);
-
- //Assert the state of the newly created file
- Command readFileCmd = service.getCommandFactory().createFileGetCommand(path,
Locale.ENGLISH);
- File storedFile = (File)service.execute(readFileCmd);
-
- assertNotNull("File not successfully stored!!", storedFile);
- assertEquals("Encoding does not match!!",
file.getContent().getEncoding(), "UTF-8");
- assertEquals("Bytes Check",
file.getContent().getContentAsString().trim(), "");
+ //create file english
+ File file = new FileImpl();
+ file.setBasePath(path);
+
+ Content content = new ContentImpl();
+ content.setEncoding("UTF-8");
+ content.setTitle("English Title");
+ content.setDescription("English Description");
+ content.setBasePath(path + "/" + Locale.ENGLISH.getLanguage());
+ content.setBytes("".getBytes());
+ content.setMimeType("image/gif");
+ file.setContent(Locale.ENGLISH, content);
+
+ Command createFileCMD = service.getCommandFactory().createNewFileCommand(file,
content);
+ service.execute(createFileCMD);
+
+ //Assert the state of the newly created file
+ Command readFileCmd = service.getCommandFactory().createFileGetCommand(path,
Locale.ENGLISH);
+ File storedFile = (File)service.execute(readFileCmd);
+
+ assertNotNull("File not successfully stored!!", storedFile);
+ assertEquals("Encoding does not match!!",
file.getContent().getEncoding(), "UTF-8");
+ assertEquals("Bytes Check",
file.getContent().getContentAsString().trim(), "");
}
-
- /**
- *
- * @param path
- */
+
+ /** @param path */
private void fileCreate(String path)
{
//create file english
@@ -235,8 +231,8 @@
content.setBytes("1234567890".getBytes());
content.setMimeType("image/gif");
file.setContent(Locale.ENGLISH, content);
-
- Command createFileCMD = service.getCommandFactory().createNewFileCommand(file,
content);
+
+ Command createFileCMD = service.getCommandFactory().createNewFileCommand(file,
content);
service.execute(createFileCMD);
- }
+ }
}
Modified: modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml 2009-01-31 16:32:09
UTC (rev 12753)
+++ modules/cms/trunk/cms-jackrabbit/src/test/resources/jboss-unit.xml 2009-01-31 19:08:32
UTC (rev 12754)
@@ -3,128 +3,131 @@
xmlns="urn:jboss:jboss-unit:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
- <pojo>
+ <pojo>
<parameter name="datasources" value="datasources.xml"/>
- <parameter name="dataSourceName">
- <value>hsqldb</value>
- <!--
- <value>oracle10g</value>
- <value>mysql5</value>
- <value>postgresql8</value>
- -->
- </parameter>
- <parameter name="hibernateConfig"
value="hibernates.xml"/>
- <test >
+ <parameter name="dataSourceName">
+ <value>hsqldb</value>
+ <!--
+ <value>oracle10g</value>
+ <value>mysql5</value>
+ <value>postgresql8</value>
+ -->
+ </parameter>
+ <parameter name="hibernateConfig"
value="hibernates.xml"/>
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFileArchiveUpload"/>
- </test>
- <test >
+ </test>
+ <test>
<class name="org.jboss.portal.cms.test.commands.TestFileCopy"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFileCreate"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFileCreateFailed"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFileDelete"/>
</test>
- <test >
+ <test>
<class name="org.jboss.portal.cms.test.commands.TestFileGet"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFileGetList"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFileGetVersion"/>
</test>
- <test >
+ <test>
<class name="org.jboss.portal.cms.test.commands.TestFileSize"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFileUpdate"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFolderCopy"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFolderCreate"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFolderDelete"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFolderGet"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestFolderUpdate"/>
</test>
- <test >
+ <test>
<class name="org.jboss.portal.cms.test.commands.TestSearch"/>
</test>
- <test >
+ <test>
<class name="org.jboss.portal.cms.test.TestJackrabbit"/>
</test>
- <test >
+ <test>
<class name="org.jboss.portal.cms.test.TestRegEx"/>
</test>
- <test >
+ <test>
<class name="org.jboss.portal.cms.test.TestRepositoryUtil"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.commands.TestRepositoryBootStrap"/>
</test>
+ <test>
+ <class name="org.jboss.portal.cms.test.NodeUtilTestCase"/>
+ </test>
</pojo>
<pojo>
<parameter name="datasources" value="datasources.xml"/>
- <parameter name="dataSourceName">
- <value>hsqldb</value>
- <!--
- <value>oracle10g</value>
- <value>mysql5</value>
- <value>postgresql8</value>
- -->
+ <parameter name="dataSourceName">
+ <value>hsqldb</value>
+ <!--
+ <value>oracle10g</value>
+ <value>mysql5</value>
+ <value>postgresql8</value>
+ -->
</parameter>
<parameter name="hibernateConfig"
value="hibernates.xml"/>
<parameter name="standardIdentityConfig"
value="standardidentity-config.xml"/>
<parameter name="identityConfig" value="db-config.xml"/>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.security.TestManageAccess"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.security.TestReadAccess"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.security.TestWriteAccess"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.security.TestNewReadCommand"/>
</test>
- </pojo>
+ </pojo>
- <pojo>
+ <pojo>
<parameter name="datasources" value="datasources.xml"/>
<parameter name="dataSourceName">
- <value>hsqldb</value>
- <!--
- <value>oracle10g</value>
- <value>mysql5</value>
- <value>postgresql8</value>
- -->
+ <value>hsqldb</value>
+ <!--
+ <value>oracle10g</value>
+ <value>mysql5</value>
+ <value>postgresql8</value>
+ -->
</parameter>
<parameter name="hibernateConfig"
value="hibernates.xml"/>
<parameter name="standardIdentityConfig"
value="standardidentity-config.xml"/>
<parameter name="identityConfig" value="db-config.xml"/>
-
- <test >
+
+ <test>
<class
name="org.jboss.portal.cms.test.workflow.TestApprovedPublish"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.workflow.TestDeniedPublish"/>
</test>
- <test >
+ <test>
<class
name="org.jboss.portal.cms.test.workflow.TestWorkflowEnvironment"/>
</test>
- </pojo>
+ </pojo>
</jboss-unit>
\ No newline at end of file
Added: modules/cms/trunk/cms-jackrabbit/src/test/resources/jcr/bad_cms.zip
===================================================================
(Binary files differ)
Property changes on: modules/cms/trunk/cms-jackrabbit/src/test/resources/jcr/bad_cms.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream