* You may obtain a copy of the ECL 2.0 License at\r
* https://source.collectionspace.org/collection-space/LICENSE.txt\r
*/\r
-package org.collectionspace.services.ItegrationTests.test;\r
+package org.collectionspace.services.IntegrationTests.test;\r
\r
import java.util.ArrayList;\r
\r
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.collectionspace.services.ItegrationTests.test;
+package org.collectionspace.services.IntegrationTests.test;
import java.util.List;
--- /dev/null
+package org.collectionspace.services.IntegrationTests.test;\r
+\r
+import org.collectionspace.services.IntegrationTests.xmlreplay.ServiceResult;\r
+import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplay;\r
+import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplayTest;\r
+import org.testng.annotations.Test;\r
+\r
+import java.util.List;\r
+\r
+/**\r
+ * User: laramie\r
+ * $LastChangedRevision: $\r
+ * $LastChangedDate: $\r
+ */\r
+public class XmlReplayMasterTest extends XmlReplayTest {\r
+\r
+ @Test\r
+ public void runMaster() throws Exception {\r
+ XmlReplay replay = createXmlReplayUsingIntegrationTestsModule("..");\r
+ List<List<ServiceResult>> list = replay.runMaster(XmlReplay.DEFAULT_MASTER_CONTROL);\r
+ logTestForGroup(list, "XmlReplayMasterTest");\r
+ }\r
+}\r
--- /dev/null
+/**\r
+ * This document is a part of the source code and related artifacts\r
+ * for CollectionSpace, an open source collections management system\r
+ * for museums and related institutions:\r
+ *\r
+ * http://www.collectionspace.org\r
+ * http://wiki.collectionspace.org\r
+ *\r
+ * Copyright (c) 2009 Regents of the University of California\r
+ *\r
+ * Licensed under the Educational Community License (ECL), Version 2.0.\r
+ * You may not use this file except in compliance with this License.\r
+ *\r
+ * You may obtain a copy of the ECL 2.0 License at\r
+ * https://source.collectionspace.org/collection-space/LICENSE.txt\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package org.collectionspace.services.IntegrationTests.test;\r
+\r
+import org.collectionspace.services.IntegrationTests.xmlreplay.ServiceResult;\r
+import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplay;\r
+import org.collectionspace.services.IntegrationTests.xmlreplay.XmlReplayTest;\r
+import org.testng.annotations.Test;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+/** The test cases in here also document the ways that XmlReplay was designed to be used programmatically.\r
+ * The most automated way to use XmlReplay is demonstrated in runMaster(). You just create a master file and a control\r
+ * file in the IntegrationTests xml replay repository, which is in services/IntegrationTests + XmlReplayTest.XMLREPLAY_REL_DIR_TO_MODULE.\r
+ *\r
+ * If you choose to run from a module, you'll need to add a dependency to the IntegrationTests module:\r
+ * e.g.\r
+ * <project ...>\r
+ * <dependencies>\r
+ * <dependency>\r
+ <groupId>org.collectionspace.services</groupId>\r
+ <artifactId>org.collectionspace.services.IntegrationTests</artifactId>\r
+ <version>${project.version}</version>\r
+ </dependency>\r
+ *\r
+ * User: laramie\r
+ * $LastChangedRevision: $\r
+ * $LastChangedDate: $\r
+ */\r
+public class XmlReplaySelfTest extends XmlReplayTest {\r
+\r
+ public static XmlReplay createXmlReplay() throws Exception {\r
+ return XmlReplayTest.createXmlReplayUsingIntegrationTestsModule("..");\r
+ //NOTE: this self-test lives in services/IntegrationTests, so relToServicesRoot is ".."\r
+ // but if you were running from, say, services/dimension/client, then relToServicesRoot would be "../.."\r
+ // so you would have to call XmlReplayTest.createXmlReplayUsingIntegrationTestsModule("../..")\r
+ // which is done for you if you just call XmlReplayTest.createXmlReplay().\r
+ }\r
+\r
+ @Test\r
+ public void runMaster() throws Exception {\r
+ XmlReplay replay = createXmlReplay();\r
+ List<List<ServiceResult>> list = replay.runMaster("xml-replay-master-self-test.xml");\r
+ logTestForGroup(list, "runMaster");\r
+ }\r
+\r
+ @Test\r
+ public void runTestGroup() throws Exception {\r
+ XmlReplay replay = createXmlReplay();\r
+ replay.readOptionsFromMasterConfigFile("xml-replay-master-self-test.xml"); //or use: XmlReplay.DEFAULT_MASTER_CONTROL as master filename;\r
+ replay.setControlFileName("xml-replay-self-test.xml");\r
+ List<ServiceResult> list = replay.runTestGroup("selftestGroup");\r
+ logTest(list, "runTestGroup");\r
+ }\r
+\r
+ @Test\r
+ public void runOneTest() throws Exception {\r
+ XmlReplay replay = createXmlReplay();\r
+ replay.readOptionsFromMasterConfigFile("xml-replay-master-self-test.xml");\r
+ replay.setControlFileName("xml-replay-self-test.xml");\r
+\r
+ ServiceResult res = replay.runTest("selftestGroup", "OrgAuth1");\r
+ logTest(res, "runOneTest");\r
+ }\r
+\r
+\r
+ @Test\r
+ public void runMultipleTestsManualCleanup() throws Exception {\r
+ XmlReplay replay = createXmlReplay();\r
+ replay.readOptionsFromMasterConfigFile("xml-replay-master-self-test.xml");\r
+ replay.setControlFileName("xml-replay-self-test.xml");\r
+ replay.setAutoDeletePOSTS(false); //defaults to true, so turn it off to to it ourselves.\r
+\r
+ List<ServiceResult> testResultsList = new ArrayList<ServiceResult>();\r
+\r
+ ServiceResult res1 = replay.runTest("selftestGroup", "OrgAuth1");\r
+ testResultsList.add(res1);\r
+\r
+ ServiceResult res2 = replay.runTest("selftestGroup", "Org1");\r
+ testResultsList.add(res2);\r
+\r
+ ServiceResult res3 = replay.runTest("selftestGroup", "getOrg1");\r
+ testResultsList.add(res3);\r
+\r
+ //Now, clean up. You may skip this if your tests do all the DELETEs.\r
+ List<ServiceResult> deleteList = replay.autoDelete("runMultipleTestsManualCleanup");\r
+\r
+ logTest(testResultsList, "runTwoTestsManualCleanup.tests");\r
+ logTest(deleteList, "runTwoTestsManualCleanup.cleanups");\r
+\r
+ }\r
+\r
+\r
+ @Test\r
+ public void runTestGroup_AllOptions() throws Exception {\r
+ XmlReplay replay = createXmlReplay(); //Use the central repository.\r
+ //You can also use your own xml replay repository in your module, like so:\r
+ // XmlReplay replay = XmlReplayTest.createXmlReplayForModule(); if you are in your module\r
+ //You can also manually specify to use the central repository:\r
+ // XmlReplay replay = XmlReplayTest.createXmlReplayUsingIntegrationTestsModule(".."); if you are in a module such as dimension\r
+ // XmlReplay replay = XmlReplayTest.createXmlReplayUsingIntegrationTestsModule("../.."); if you are in a module such as dimension/client\r
+\r
+ //You may read Dump, Auths, and protoHostPort from the master file:\r
+ replay.readOptionsFromMasterConfigFile("xml-replay-master-self-test.xml"); //or use: XmlReplay.DEFAULT_MASTER_CONTROL as master filename;\r
+ //or you may set those options individually as shown next.\r
+ // Note that controlFileName is NOT set from calling readOptionsFromMasterConfigFile.\r
+ // If you run a master, it sets controlFileName, possibly in a loop.\r
+ // All of the Auths will be read from the master file, and may be referenced from your control file,\r
+ // or you may specify Auths in your control file. There are also public methods to set the AuthsMap yourself.\r
+\r
+ //XmlReplay wants to know about two files: a master and a control file\r
+ // The master references one to many control files.\r
+ // If you don't call runMaster(), you must specify the control file:\r
+ replay.setControlFileName("xml-replay-self-test.xml");\r
+\r
+ //These option default sensibly, some of them from the master, but here's how to set them all:\r
+\r
+ //Dump determines how much goes to log, and how verbose.\r
+ XmlReplay.Dump dump = XmlReplay.getDumpConfig(); //static factory call.\r
+ dump.payloads = false;\r
+ dump.dumpServiceResult = ServiceResult.DUMP_OPTIONS.minimal;\r
+ replay.setDump(dump);\r
+\r
+ //use this if you must look it up from some other place.\r
+ // Default is to have it in xml-replay-master.xml\r
+ replay.setProtoHostPort("http://localhost:8180");\r
+\r
+ //Default is true, but you can override if you want to leave objects on server, or control the order of deletion.\r
+ replay.setAutoDeletePOSTS(false);\r
+\r
+ //You don't need this, but you can inspect what XmlReplay holds onto: a data structure of CSIDs\r
+ Map<String, ServiceResult> serviceResultsMap = replay.getServiceResultsMap();\r
+\r
+ // ****** RUN A GROUP ***********************************************\r
+ List<ServiceResult> list = replay.runTestGroup("selftestGroup");\r
+\r
+ // This runs a group called "organization" inside a control file named above, which happens to be called "organization.xml".\r
+ // You could also run just one test using these options by calling replay.runTest as shown above in XmlReplayTest.runOneTest()\r
+\r
+ //Now, since we set setAutoDeletePOSTS(false) above, you can clean up manually:\r
+ replay.autoDelete("runTestGroup_AllOptions"); //deletes everything in serviceResultsMap, which it hangs onto.\r
+\r
+ logTest(list, "runTestGroup_AllOptions");\r
+ }\r
+\r
+}\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:persons_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+<inAuthority>4a6dc8f3-3329-4c5d-a1a8</inAuthority>\r
+<shortIdentifier>connieContactPerson</shortIdentifier>\r
+<refName>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth)'TestPersonAuth':person:name(connieContactPerson)</refName>\r
+<displayNameComputed>true</displayNameComputed>\r
+<foreName>Connie</foreName>\r
+<surName>ContactPerson</surName>\r
+</ns2:persons_common>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:personauthorities_common xmlns:ns2="http://collectionspace.org/services/person" xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+<displayName>TestPersonAuth</displayName>\r
+<shortIdentifier>TestPersonAuth</shortIdentifier>\r
+<refName>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth)'TestPersonAuth'</refName>\r
+<vocabType>PersonAuthority</vocabType>\r
+</ns2:personauthorities_common>
\ No newline at end of file
--- /dev/null
+-- MySQL dump 10.11
+--
+-- Host: localhost Database: nuxeo
+-- ------------------------------------------------------
+-- Server version 5.0.51a-24+lenny3
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `acquisitions_common_acquisitionsources`
+--
+
+DROP TABLE IF EXISTS `acquisitions_common_acquisitionsources`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+CREATE TABLE `acquisitions_common_acquisitionsources` (
+ `id` varchar(36) character set utf8 collate utf8_bin NOT NULL,
+ `pos` int(11) default NULL,
+ `item` varchar(500) default NULL,
+ KEY `acquisitions_common_acquisitionsources_id_hierarchy_fk` (`id`),
+ KEY `id_idx` (`id`),
+ CONSTRAINT `acquisitions_common_acquisitionsources_id_hierarchy_fk` FOREIGN KEY (`id`) REFERENCES `hierarchy` (`id`) ON DELETE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+SET character_set_client = @saved_cs_client;
+
+--
+-- Dumping data for table `acquisitions_common_acquisitionsources`
+--
+
+LOCK TABLES `acquisitions_common_acquisitionsources` WRITE;
+/*!40000 ALTER TABLE `acquisitions_common_acquisitionsources` DISABLE KEYS */;
+INSERT INTO `acquisitions_common_acquisitionsources` VALUES ('7a517303-afad-458f-b8fb-3adaaad901b0',0,'urn:cspace:org.collectionspace.demo:personauthority:name(person):person:name(stephencharla)\'Stephen+Charla\''),('7a517303-afad-458f-b8fb-3adaaad901b0',1,'urn:cspace:org.collectionspace.demo:orgauthority:name(organization):organization:name(emersonradiophonographcorporation)\'Emerson+Radio+Phonograph+Corporation\''),('7a517303-afad-458f-b8fb-3adaaad901b0',2,''),('7a517303-afad-458f-b8fb-3adaaad901b0',3,'urn:cspace:org.collectionspace.demo:orgauthority:name(organization):organization:name(irwintoylimited)\'Irwin+Toy+Limited\''),('08372066-b1cd-4168-b480-6e198eff4df3',0,''),('a5235e94-9612-4fcd-a125-019a937cfb39',0,''),('65d03bcd-8c4a-48e6-a204-850bb382cb15',0,''),('4e330edd-ebf4-4425-bb18-2d58624cbb25',0,' ⺠, 0 1The β Source of All ψ Acquisitions'),('d675779c-e93d-48ce-bed9-3ac3dd3740c2',0,' ? , 0 1The ? Source of All ? Acquisitions');
+/*!40000 ALTER TABLE `acquisitions_common_acquisitionsources` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2010-10-08 22:31:11
--- /dev/null
+update acquisitions_common_acquisitionsources set item =' ⺠, 0 1The β Source of All ψ Acquisitions' where id = '4e330edd-ebf4-4425-bb18-2d58624cbb25';
+
+
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ns2:acquisitions_common xmlns:ns2="http://collectionspace.org/services/acquisition">
+ <fieldCollectionNumber/>
+ <transferOfTitleNumber>This is a transfer of title number</transferOfTitleNumber>
+ <acquisitionFundingSourceProvisos/>
+ <acquisitionAuthorizerDate/>
+ <acquisitionFundingValue/>
+ <acquisitionFundingSource/>
+ <acquisitionReason/>
+ <accessionDate/>
+ <acquisitionMethod/>
+ <acquisitionNote>fubar</acquisitionNote>
+ <fieldCollectionEventName/>
+ <acquisitionAuthorizer/>
+ <objectPurchasePriceDenomination/>
+ <acquisitionDate/>
+ <fieldCollector/>
+ <acquisitionProvisos/>
+ <objectPurchaseOfferPriceValue/>
+ <acquisitionSources>
+ <acquisitionSource> ⺠ , 0 1The β Source of All ψ Acquisitions</acquisitionSource>
+ </acquisitionSources>
+ <objectPurchaseOfferPriceDenomination/>
+ <acquisitionReferenceNumber/>
+ <acquisitionFundingDenomination/>
+</ns2:acquisitions_common>
+
--- /dev/null
+ ⺠, 0 1The β Source of All ψ Acquisitions\r
--- /dev/null
+Here are the steps we tried:\r
+\r
+On nightly.collectionspace.org, which is running Nuxeo 5.3 with mysql\r
+\r
+ Update a record through Nuxeo Web GUI, inserting a greek psi character. \r
+ ==> failure: able to edit record, but on read and edit again, character is tranformed into question mark.\r
+ \r
+On nightly, we ran a SQL update and then a SQL dump on a table, and got the UTF8 non-Latin1 characters back. \r
+ ==> success: full round trip, from file.sql to MySQL to file.out .\r
+ Note that we used the UTF8 option on the command line:\r
+ \r
+ mysql -u cspace_user -p --default_character_set utf8 nuxeo < ~/acq.sql\r
+ \r
+ mysqldump -u cspace_user -p nuxeo acquisitions_common_acquisitionsources > acq.out\r
+ \r
+On localhost which is running the older version of Nuxeo with mysql\r
+\r
+ Update a record through Nuxeo Web GUI, inserting a greek psi character. \r
+ ==> success: able to read and edit record and see character.\r
+ \r
+ \r
+ \r
+Notes:\r
+ Check the encoding of the DB:\r
+ mysql> SHOW VARIABLES LIKE 'character_set_database'; \r
+\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <protoHostPort>http://localhost:8280</protoHostPort>\r
+ <testGroup ID="nonlatin" autoDeletePOSTS="false">\r
+ <test ID="1001">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/acquisitions/</uri>\r
+ <part>\r
+ <label>acquisitions_common</label>\r
+ <filename>acq19-mod.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/acquisitions/</uri>\r
+ <fromTestID>1001</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+</xmlReplay>\r
--- /dev/null
+Here are the steps we tried:\r
+\r
+On nightly.collectionspace.org, which is running Nuxeo 5.3 with mysql\r
+\r
+ Update a record through Nuxeo Web GUI, inserting a greek psi character. \r
+ ==> failure: able to edit record, but on read and edit again, character is tranformed into question mark.\r
+ \r
+On nightly, we ran a SQL update and then a SQL dump on a table, and got the UTF8 non-Latin1 characters back. \r
+ ==> success: full round trip, from file.sql to MySQL to file.out .\r
+ Note that we used the UTF8 option on the command line:\r
+ \r
+ mysql -u cspace_user -p --default_character_set utf8 nuxeo < ~/acq.sql\r
+ \r
+ mysqldump -u cspace_user -p nuxeo acquisitions_common_acquisitionsources > acq.out\r
+ \r
+On localhost which is running the older version of Nuxeo with mysql\r
+\r
+ Update a record through Nuxeo Web GUI, inserting a greek psi character. \r
+ ==> success: able to read and edit record and see character.\r
+ \r
+ \r
+ \r
+Notes:\r
+ Check the encoding of the DB:\r
+ mysql> SHOW VARIABLES LIKE 'character_set_database'; \r
+\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Document : cspace-2242-first-value-instance-blank.xml
+ Created on :
+ Author :
+ Description: Test data for http://issues.collectionspace.org/browse/CSPACE-2242
+-->
+
+<ns2:collectionobjects_common
+ xmlns:ns2="http://collectionspace.org/services/collectionobject"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://collectionspace.org/services/collectionobject http://services.collectionspace.org/collectionobject/collectionobjects_common.xsd">
+ <objectNumber>2</objectNumber>
+ <comments>description</comments>
+ <title></title>
+ <briefDescriptions>
+ <!-- First value instance of this repeatable field is blank -->
+ <briefDescription></briefDescription>
+ <briefDescription></briefDescription>
+ <briefDescription>bob2</briefDescription>
+ </briefDescriptions>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Document : cspace-2242-first-value-instance-nonblank.xml
+ Created on :
+ Author :
+ Description: Test data for http://issues.collectionspace.org/browse/CSPACE-2242
+-->
+
+<ns2:collectionobjects_common
+ xmlns:ns2="http://collectionspace.org/services/collectionobject"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://collectionspace.org/services/collectionobject http://services.collectionspace.org/collectionobject/collectionobjects_common.xsd">
+ <objectNumber>2</objectNumber>
+ <comments>description</comments>
+ <title></title>
+ <briefDescriptions>
+ <!-- First value instance of this repeatable field is non-blank -->
+ <briefDescription>data</briefDescription>
+ <briefDescription></briefDescription>
+ <briefDescription>bob2</briefDescription>
+ </briefDescriptions>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns3:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/jaxb" xmlns:ns3="http://collectionspace.org/services/collectionobject">\r
+<remNumber>\r
+<numberValue>2271966-1285644709415</numberValue>\r
+<numberType>remNumber</numberType>\r
+</remNumber>\r
+<objectNumber>objectNumber-1285644709375</objectNumber>\r
+<otherNumberList>\r
+<otherNumber>\r
+<numberValue>101.objectName-1285644709375</numberValue>\r
+<numberType>integer</numberType>\r
+</otherNumber>\r
+<otherNumber>\r
+<numberValue>101.502.23.456.objectName-1285644709375</numberValue>\r
+<numberType>ipaddress</numberType>\r
+</otherNumber>\r
+</otherNumberList>\r
+<otherNumber>urn:org.walkerart.id:123</otherNumber>\r
+<briefDescriptions>\r
+<briefDescription>Papier mache bird cow mask with horns, painted red with black and yellow spots. Puerto Rico. ca. 8&quot; high, 6&quot; wide, projects 10&quot; (with horns).</briefDescription>\r
+<briefDescription>Acrylic rabbit mask with wings, painted red with green and aquamarine spots. Puerto Rico. ca. 8&quot; high, 6&quot; wide, projects 10&quot; (with wings).</briefDescription>\r
+</briefDescriptions>\r
+<objectNameList>\r
+<objectNameGroup>\r
+<objectName>an object name</objectName>\r
+</objectNameGroup>\r
+</objectNameList>\r
+<responsibleDepartments>\r
+<responsibleDepartment>urn:org.collectionspace.services.department:Registrar</responsibleDepartment>\r
+<responsibleDepartment>urn:org.walkerart.department:Fine Art</responsibleDepartment>\r
+</responsibleDepartments>\r
+<title>atitle</title>\r
+<age>\r
+</age>\r
+<dimensions>\r
+<dimensionGroup>\r
+<dimension>length</dimension>\r
+<measuredPart>head</measuredPart>\r
+<measurementUnit>cm</measurementUnit>\r
+<value>30</value>\r
+</dimensionGroup>\r
+<dimensionGroup>\r
+<dimension>width</dimension>\r
+<measuredPart>leg</measuredPart>\r
+<measurementUnit>m</measurementUnit>\r
+<value>2.57</value>\r
+<valueQualifier>\r
+</valueQualifier>\r
+</dimensionGroup>\r
+</dimensions>\r
+</ns3:collectionobjects_common>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:collectionobjects_naturalhistory xmlns:ns2="http://collectionspace.org/services/collectionobject/domain/naturalhistory">\r
+<nh-string>test-string</nh-string>\r
+<nh-int>999</nh-int>\r
+<nh-long>9999</nh-long>\r
+</ns2:collectionobjects_naturalhistory>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject">
+<objectNumber>objectNumber</objectNumber>
+<!-- test child repeatable field with null value -->
+<responsibleDepartments><responsibleDepartment></responsibleDepartment></responsibleDepartments>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject">
+<objectNumber>objectNumber</objectNumber>
+
+<otherNumber>XXX</otherNumber>
+<otherNumberType>otherNumberType</otherNumberType>
+<briefDescriptions> <briefDescription> briefDescription</briefDescription></briefDescriptions>
+<distinguishingFeatures>distFeatures</distinguishingFeatures>
+<numberOfObjects>numberOfObjects</numberOfObjects>
+<!-- test whitespace as first child node -->
+<responsibleDepartments> <responsibleDepartment> responsibleDept1</responsibleDepartment><responsibleDepartment>responsibleDept2</responsibleDepartment></responsibleDepartments>
+<title>title</title>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject">
+<objectNumber>objectNumber</objectNumber>
+
+<otherNumber>XXX</otherNumber>
+<otherNumberType>otherNumberType</otherNumberType>
+<briefDescriptions>
+<briefDescription>briefDescription1</briefDescription>
+<briefDescription>briefDescription2</briefDescription>
+</briefDescriptions>
+<distinguishingFeatures>distFeatures</distinguishingFeatures>
+<numberOfObjects>numberOfObjects</numberOfObjects>
+<!-- test newline whitespace -->
+<responsibleDepartments>
+<responsibleDepartment>responsibleDept1</responsibleDepartment>
+<responsibleDepartment>responsibleDept2</responsibleDepartment>
+</responsibleDepartments>
+
+<title>title</title>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject">
+<objectNumber>objectNumber</objectNumber>
+
+<otherNumber>XXX</otherNumber>
+<otherNumberType>otherNumberType</otherNumberType>
+<briefDescriptions>
+<!-- test childnode as whitespace -->
+<briefDescription> briefDescription1</briefDescription>
+<briefDescription>briefDescription2</briefDescription>
+</briefDescriptions>
+
+<distinguishingFeatures>distFeatures</distinguishingFeatures>
+<numberOfObjects>numberOfObjects</numberOfObjects>
+<!-- test newline whitespace -->
+<responsibleDepartments>
+<!-- test childnode as whitespace -->
+<responsibleDepartment> responsibleDept1</responsibleDepartment>
+<responsibleDepartment>responsibleDept2</responsibleDepartment>
+</responsibleDepartments>
+
+<title>title</title>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject">
+<objectNumber>objectNumber</objectNumber>
+
+<otherNumber>XXX</otherNumber>
+<otherNumberType>otherNumberType</otherNumberType>
+<briefDescriptions>
+ <briefDescription>briefDescription1</briefDescription>
+ <briefDescription>briefDescription2</briefDescription>
+</briefDescriptions>
+<distinguishingFeatures>distFeatures</distinguishingFeatures>
+<numberOfObjects>numberOfObjects</numberOfObjects>
+<!-- test newline and tab whitespace -->
+<responsibleDepartments>
+ <responsibleDepartment>responsibleDept1</responsibleDepartment>
+ <responsibleDepartment>responsibleDept2</responsibleDepartment>
+</responsibleDepartments>
+
+<title>title</title>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject">
+ <objectNumber>objectNumber</objectNumber>
+ <otherNumber>XXX</otherNumber>
+ <otherNumberType>otherNumberType</otherNumberType>
+ <comments>This is an UPDATEd comment</comments>
+ <title>NEW TITLE UPDATED</title>
+
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ns2:collectionobjects_common xmlns:ns2="http://collectionspace.org/services/collectionobject">
+ <objectNumber>objectNumber</objectNumber>
+ <otherNumber>XXX</otherNumber>
+ <otherNumberType>otherNumberType</otherNumberType>
+ <!-- briefDescription>briefDescription</briefDescription -->
+ <comments>comments</comments>
+ <distinguishingFeatures>distFeatures</distinguishingFeatures>
+ <numberOfObjects>numberOfObjects</numberOfObjects>
+ <responsibleDepartments>
+ </responsibleDepartments>
+ <title>title</title>
+ <objectTitleLanguage>objectTitleLanguage</objectTitleLanguage>
+ <titleTranslation>titleTranslation</titleTranslation>
+ <titleType>titleType</titleType>
+ <age>age</age>
+ <ageQualifier>ageQualifier</ageQualifier>
+ <ageUnit>ageUnit</ageUnit>
+ <color>color</color>
+ <contentActivity>contentActivity</contentActivity>
+ <contentConcept>contentConcept</contentConcept>
+ <contentDate>XXX</contentDate>
+ <contentDescription>contentDescription</contentDescription>
+ <contentEventName>contentEventName</contentEventName>
+ <contentEventNameType>contentEventNameType</contentEventNameType>
+ <contentNote>contentNote</contentNote>
+ <contentLanguage>contentLanguage</contentLanguage>
+ <contentObject>contentObject</contentObject>
+ <contentObjectType>contentObjectType</contentObjectType>
+ <contentOrganization>contentOrganization</contentOrganization>
+ <contentOther>contentOther</contentOther>
+ <contentOtherType>contentOtherType</contentOtherType>
+ <contentPeople>contentPeople</contentPeople>
+ <contentPerson>contentPerson</contentPerson>
+ <contentPlace>contentPlace</contentPlace>
+ <contentPosition>contentPosition</contentPosition>
+ <contentScript>XXX</contentScript>
+ <copyNumber>copyNumber</copyNumber>
+ <editionNumber>editionNumber</editionNumber>
+ <form>form</form>
+ <inscriptionContent>inscriptionContent</inscriptionContent>
+<inscriptionContentInscriber>inscriptionContentInscriber</inscriptionContentInscriber>
+<inscriptionContentDate>inscriptionContentDate</inscriptionContentDate>
+<inscriptionContentInterpretation>inscriptionContentInterpretation</inscriptionContentInterpretation>
+<inscriptionContentLanguage>inscriptionContentLanguage</inscriptionContentLanguage>
+<inscriptionContentMethod>inscriptionContentMethod</inscriptionContentMethod>
+<inscriptionContentPosition>inscriptionContentPosition</inscriptionContentPosition>
+<inscriptionContentScript>inscriptionContentScript</inscriptionContentScript>
+<inscriptionContentTranslation>inscriptionContentTranslation</inscriptionContentTranslation>
+<inscriptionContentTransliteration>inscriptionContentTransliteration</inscriptionContentTransliteration>
+<inscriptionContentType>inscriptionContentType</inscriptionContentType> <inscriptionDescription>inscriptionDescription</inscriptionDescription>
+
+<inscriptionDescriptionInscriber>inscriptionDescriptionInscriber</inscriptionDescriptionInscriber>
+
+<inscriptionDescriptionDate>inscriptionDescriptionDate</inscriptionDescriptionDate>
+
+<inscriptionDescriptionInterpretation>inscriptionDescriptionInterpretation</inscriptionDescriptionInterpretation>
+
+<inscriptionDescriptionMethod>inscriptionDescriptionMethod</inscriptionDescriptionMethod>
+
+<inscriptionDescriptionPosition>inscriptionDescriptionPosition</inscriptionDescriptionPosition>
+
+<inscriptionDescriptionType>inscriptionDescriptionType</inscriptionDescriptionType>
+ <material>material</material>
+ <materialComponent>materialComponent</materialComponent>
+ <materialComponentNote>materialComponentNote</materialComponentNote>
+ <materialName>materialName</materialName>
+ <materialSource>materialSource</materialSource>
+ <objectStatus>objectStatus</objectStatus>
+ <phase>phase</phase>
+ <physicalDescription>physicalDescription</physicalDescription>
+ <sex>sex</sex>
+ <style>style</style>
+ <technicalAttribute>technicalAttribute</technicalAttribute>
+
+<technicalAttributeMeasurement>technicalAttributeMeasurement</technicalAttributeMeasurement>
+
+<technicalAttributeMeasurementUnit>technicalAttributeMeasurementUnit</technicalAttributeMeasurementUnit>
+ <objectComponentName>objectComponentName</objectComponentName>
+
+<objectComponentInformation>objectComponentInformation</objectComponentInformation>
+ <dateAssociation>dateAssociation</dateAssociation>
+
+<dateEarliestSingle>{"level":"objectLevel","content-script":"descContentScript","content-method":"descContentMethod","otherNumber":"otherNumber"}</dateEarliestSingle>
+
+<dateEarliestSingleCertainty>dateEarliestSingleCertainty</dateEarliestSingleCertainty>
+
+<dateEarliestSingleQualifier>dateEarlierstSingleQualifier</dateEarliestSingleQualifier>
+ <dateLatest>XXX</dateLatest>
+ <dateLatestCertainty>dateLatestCertainty</dateLatestCertainty>
+ <dateLatestQualifier>dateLatestQualifier</dateLatestQualifier>
+ <datePeriod>datePeriod</datePeriod>
+ <dateText>dateText</dateText>
+</ns2:collectionobjects_common>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplayMaster>\r
+ <protoHostPort>http://localhost:8180</protoHostPort>\r
+ \r
+ <!-- legal values for dumpServiceResult=[minimal,detailed,full] -->\r
+ <dump payloads="false" dumpServiceResult="minimal" />\r
+ \r
+ <auths default="test">\r
+ <auth ID="test">dGVzdDp0ZXN0</auth>\r
+ </auths>\r
+\r
+ \r
+ <run controlFile="./dimension.xml" testGroup="dimensionTestGroup" />\r
+ \r
+</xmlReplayMaster>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <auths>\r
+ <!-- IMPORTANT: THESE ARE STICKY :: THEY STICK AROUND UNTIL RESET, IN EXEC ORDER OF THIS FILE. -->\r
+ <auth ID="test">dGVzdDp0ZXN0</auth>\r
+ <auth ID="bigbird2010">YmlnYmlyZDIwMTA6YmlnYmlyZDIwMTA=</auth>\r
+ </auths>\r
+ \r
+ <!-- ================================================================================ -->\r
+ \r
+ <testGroup ID="dimensionTestGroup" autoDeletePOSTS="false">\r
+ <!-- should fail on auth="bigbird2010" since bigbird2010 is not defined on back end. -->\r
+ <test ID="dimension1" auth="bigbird2010">\r
+ <expectedCodes>403</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+\r
+ <!-- should succeed on auth="test" since test is admin user. -->\r
+ <test ID="dimension2" auth="test">\r
+ <!-- actually, this one should succeed since "test" is admin, but it fails now. -->\r
+ <expectedCodes>403</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+\r
+ \r
+ </testGroup>\r
+</xmlReplay>\r
+ \r
+
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:dimensions_common\r
+xmlns:ns2="http://collectionspace.org/services/dimension"\r
+xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <dimension>dimensionType-1288727556164</dimension>\r
+ <value>entryNumber-1288727556164</value>\r
+ <valueDate>entryDate-1288727556164</valueDate>\r
+</ns2:dimensions_common>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:dimensions_common\r
+xmlns:ns2="http://collectionspace.org/services/dimension"\r
+xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <dimension>dimensionType-1288727552274</dimension>\r
+ <value>updated-entryNumber-1288727552274</value>\r
+ <valueDate>updated-entryDate-1288727552274</valueDate>\r
+</ns2:dimensions_common>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <protoHostPort>http://localhost:8280</protoHostPort>\r
+\r
+ <testGroup ID="CRUDLA" autoDeletePOSTS="true">\r
+ <test ID="CREATE">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="READ">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>nh</fromTestID>\r
+ </test>\r
+ <test ID="UPDATE">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge-update.xml</filename>\r
+ </part>\r
+ <fromTestID>cambridge-1</fromTestID>\r
+ </test>\r
+ <test ID="DELETE">\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>1001</fromTestID>\r
+ </test>\r
+ <test ID="LIST">\r
+ <method>LIST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <fromTestID>newPersonAuthority</fromTestID>\r
+ </test>\r
+ <test ID="AUTHREFS">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp2.xml</filename>\r
+ </part>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <testGroup ID="2parts" autoDeletePOSTS="true">\r
+ <test ID="nh">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <parts>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/nh-collectionobject.xml</filename>\r
+ </part>\r
+ <part>\r
+ <label>collectionobjects_naturalhistory</label>\r
+ <filename>collectionobject/nh-part.xml</filename>\r
+ </part>\r
+ </parts>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>nh</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <test ID="1002">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp2.xml</filename>\r
+ </part>\r
+ </test>\r
+\r
+ <testGroup ID="collectionobjects" autoDeletePOSTS="true">\r
+ <test ID="1001">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="1002">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp2.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp3.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>1001</fromTestID>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp4.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/cspace-2242-first-value-instance-blank.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/cspace-2242-first-value-instance-nonblank.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_null1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/?sortBy=&pgNum=0&pgSz=8</uri>\r
+ </test>\r
+ <test ID="cambridge-1">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>cambridge-1</fromTestID>\r
+ </test>\r
+ <test ID="cambridge-1-put">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge-update.xml</filename>\r
+ </part>\r
+ <fromTestID>cambridge-1</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <!-- You can run this with\r
+ mvn -q -DtestGroupID=cambridge-put-demo exec:java\r
+ -->\r
+ <testGroup ID="cambridge-put-demo" autoDeletePOSTS="true">\r
+ <test ID="cambridge-2">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>cambridge-2</fromTestID>\r
+ </test>\r
+ <test ID="cambridge-2-put">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge-update.xml</filename>\r
+ </part>\r
+ <fromTestID>cambridge-2</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <!-- You can run this with\r
+ mvn -q -DtestGroupID=authrefs exec:java\r
+ -->\r
+ <testGroup ID="authrefs" autoDeletePOSTS="true">\r
+ <test ID="newPersonAuthority">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <part>\r
+ <label>personauthorities_common</label>\r
+ <filename>authrefs/newPersonAuthority.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <fromTestID>newPersonAuthority</fromTestID>\r
+ </test>\r
+ <test ID="newPerson">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <part>\r
+ <label>persons_common</label>\r
+ <filename>authrefs/newPerson.xml</filename>\r
+ </part>\r
+ <fromTestID>newPersonAuthority</fromTestID>\r
+ </test>\r
+\r
+\r
+ <test ID="personAuthsList">\r
+ <method>LIST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <fromTestID>newPersonAuthority</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+</xmlReplay>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <testGroup ID="organization" autoDeletePOSTS="true">\r
+ <test ID="OrgAuth1" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/orgauthorities/</uri>\r
+ <part>\r
+ <label>orgauthorities_common</label>\r
+ <filename>organization/orgauthorities_common.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="Org1">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}/items/</uri>\r
+ <part>\r
+ <label>organizations_common</label>\r
+ <filename>organization/organizations_common.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}/items/${Org1.CSID}</uri>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}</uri>\r
+ </test>\r
+ <test ID="oneOrg">\r
+ <method>LIST</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}</uri>\r
+ </test>\r
+ <test ID="organizationList2">\r
+ <method>LIST</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}/items/</uri>\r
+ </test>\r
+ </testGroup>\r
+</xmlReplay>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:organizations_common\r
+xmlns:ns2="http://collectionspace.org/services/organization"\r
+xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <shortIdentifier>1288047801161</shortIdentifier>\r
+ <refName>urn:cspace:org.collectionspace.demo:orgauthority:name(1288047801161):organization:name(1288047801161)</refName>\r
+ <displayNameComputed>true</displayNameComputed>\r
+ <shortDisplayNameComputed>true</shortDisplayNameComputed>\r
+ <shortName>Test Organization-1288047801161</shortName>\r
+ <longName>Test Organization Name</longName>\r
+ <contactNames>\r
+ <contactName>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth)'TestPersonAuth':person:name(charlieOrgcontact)</contactName>\r
+ <contactName>urn:cspace:org.collectionspace.demo:personauthority:name(TestPersonAuth)'TestPersonAuth':person:name(chelsieContact)</contactName>\r
+ </contactNames>\r
+ <foundingPlace>Anytown, USA</foundingPlace>\r
+ <subBodies>\r
+ <subBody>urn:cspace:org.collectionspace.demo:orgauthority:name(1288047801161):organization:name(1288047803708)</subBody>\r
+ </subBodies>\r
+ <functions>\r
+ <function>My new function</function>\r
+ <function>My second function</function>\r
+ </functions>\r
+ <groups>\r
+ <group>My new group</group>\r
+ <group>My second group</group>\r
+ <group>My third group</group>\r
+ </groups>\r
+ \r
+</ns2:organizations_common>\r
+\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:orgauthorities_common\r
+xmlns:ns2="http://collectionspace.org/services/organization"\r
+xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <shortIdentifier>1288047801161</shortIdentifier>\r
+ <displayName>TestOrgAuth-1288047801161</displayName>\r
+ <refName>urn:cspace:org.collectionspace.demo:orgauthority:name(1288047801161)'TestOrgAuth-1288047801161'</refName>\r
+ <vocabType>OrgAuthority</vocabType>\r
+</ns2:orgauthorities_common>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:orgauthorities_common\r
+ xmlns:ns2="http://collectionspace.org/services/organization"\r
+ xmlns:ns3="http://collectionspace.org/services/jaxb">\r
+ <shortIdentifier>1288047805974</shortIdentifier>\r
+ <displayName>displayName-1288047805974</displayName>\r
+ <refName>urn:cspace:org.collectionspace.demo:orgauthority:name(1288047805974)'displayName-1288047805974'</refName>\r
+ <vocabType>OrgAuthority</vocabType>\r
+</ns2:orgauthorities_common>\r
+\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <auths>\r
+ <!-- IMPORTANT: THESE ARE STICKY :: THEY STICK AROUND UNTIL RESET, IN EXEC ORDER OF THIS FILE. -->\r
+ <auth ID="test">dGVzdDp0ZXN0</auth>\r
+ <auth ID="test-pahma">dGVzdC1wYWhtYTp0ZXN0</auth>\r
+ <auth ID="user1@museum1">dXNlcjFAbXVzZXVtMS5vcmc6dXNlcjFAbXVzZXVtMS5vcmc=</auth>\r
+ <auth ID="bigbird2010">YmlnYmlyZDIwMTA6YmlnYmlyZDIwMTA=</auth>\r
+ <auth ID="elmo2010">ZWxtbzIwMTA6ZWxtbzIwMTA=</auth>\r
+ </auths>\r
+ <testGroup ID="security" autoDeletePOSTS="false">\r
+\r
+ <!--First test that bigbird2010 does NOT have write access: -->\r
+ <test ID="dimension0" auth="bigbird2010">\r
+ <expectedCodes>401,500,501</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+\r
+ <!--Next, set up permissions and roles, and test bigbird2010 and elmo2010. -->\r
+ <test ID="permBigbird" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions</uri>\r
+ <filename>security/1-bigbird-permission.xml</filename>\r
+ </test>\r
+ <test ID="permElmo">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions</uri>\r
+ <filename>security/2-elmo-permission.xml</filename>\r
+ </test>\r
+ <test ID="roleTestCM">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/roles</uri>\r
+ <filename>security/3-role-test-cm.xml</filename>\r
+ </test>\r
+ <test ID="roleIntern">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/roles</uri>\r
+ <filename>security/4-role-intern.xml</filename>\r
+ </test>\r
+ <test ID="accountBigbird">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/accounts</uri>\r
+ <filename>security/5-account-bigbird.xml</filename>\r
+ </test>\r
+ <test ID="accountElmo">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/accounts</uri>\r
+ <filename>security/6-account-elmo.xml</filename>\r
+ </test>\r
+ <test ID="accountrolesBigbird">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/accounts/${accountBigbird.CSID}/accountroles</uri>\r
+ <filename>security/7-accountroles-bigbird.xml</filename>\r
+ </test>\r
+ <test ID="accountrolesElmo">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/accounts/${accountElmo.CSID}/accountroles</uri>\r
+ <filename>security/8-account-roles-elmo.xml</filename>\r
+ </test>\r
+ <test ID="bigbirdPermroles">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions/${permBigbird.CSID}/permroles</uri>\r
+ <filename>security/9-permissionroles-bigbird.xml</filename>\r
+ </test>\r
+ <test ID="elmoPermroles">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions/${permElmo.CSID}/permroles</uri>\r
+ <filename>security/10-permissionroles-elmo.xml</filename>\r
+ </test>\r
+\r
+ <test ID="dimension1" auth="bigbird2010">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimension2">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/dimensions/${dimension1.CSID}</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/2-put.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <fromTestID>dimension1</fromTestID>\r
+ </test>\r
+ <test ID="dimensionElmoPOST" auth="elmo2010">\r
+ <expectedCodes>403</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionElmoPUT">\r
+ <expectedCodes>403</expectedCodes>\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/dimensions/${dimension1.CSID}</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/2-put.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionElmoGET">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <fromTestID>dimension1</fromTestID>\r
+ </test>\r
+ <test ID="dimensionElmoDELETE" auth="elmo2010">\r
+ <expectedCodes>403</expectedCodes>\r
+ <method>DELETE</method>\r
+ <fromTestID>dimension1</fromTestID>\r
+ </test>\r
+ <test ID="dimensionBigbirdDELETE" auth="bigbird2010">\r
+ <method>DELETE</method>\r
+ <fromTestID>dimension1</fromTestID>\r
+ </test>\r
+\r
+ <!-- The element: <action>SEARCH </action> implies LIST\r
+ in C:\bin\xmlreplay\test-data\xmlReplay\security\1-bigbird-permission.xml\r
+ Add DELETE, do CRUD for both, then switch roles and redo CRUD\r
+ -->\r
+\r
+\r
+ <test auth="test">\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/authorization/permissions/${permBigbird.CSID}/permroles</uri>\r
+ <!-- don't do <fromTestID>, no CSID of permrole on end of url, but deleteURL will put one there for you, so don't use it.\r
+ wrong: <fromTestID>bigbirdPermroles</fromTestID>\r
+ wrong: http://localhost:8280/cspace-services/authorization/permissions/28943d0f-efac-48d3-8c01-e4ef7e75e296/permroles/0891ca9a-ba34-4701-9662-4ab73757890e\r
+ Create a <uri> element instead:\r
+ right: http://localhost:8280/cspace-services/authorization/permissions/28943d0f-efac-48d3-8c01-e4ef7e75e296/permroles\r
+ -->\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/authorization/permissions/${permElmo.CSID}/permroles</uri>\r
+ </test>\r
+ \r
+ <test ID="dimensionBigbirdPOSTAfterPermrolesDeleted" auth="bigbird2010">\r
+ <msg>Removing all permissions from Bigbird's role</msg>\r
+ <expectedCodes>403,404</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbirdPUTAfterPermrolesDeleted">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/dimensions/${dimension1.CSID}</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/2-put.xml</filename>\r
+ </part>\r
+ </test>\r
+\r
+ \r
+ <test ID="accountroles2" auth="test">\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/accounts/${accountBigbird.CSID}/accountroles</uri>\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/accounts/${accountElmo.CSID}/accountroles</uri>\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <!-- These both work, and fromTestID takes precedence. -->\r
+ <uri>${roleTestCM.deleteURL}</uri>\r
+ <fromTestID>roleTestCM</fromTestID>\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <fromTestID>roleIntern</fromTestID>\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <fromTestID>accountBigbird</fromTestID>\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <fromTestID>accountElmo</fromTestID>\r
+ </test>\r
+ <!-- delete permissions. Don't delete permissions, or Admin will get hosed. -->\r
+ </testGroup>\r
+ \r
+ \r
+ \r
+ \r
+ \r
+ <!-- ================================================================================ -->\r
+ \r
+ <testGroup ID="securityRemovingRoleperms" autoDeletePOSTS="false">\r
+\r
+ <!--First test that bigbird2010 does NOT have write access: -->\r
+ <test ID="dimensionBeforePerms" auth="bigbird2010">\r
+ <expectedCodes>401,500,501</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+\r
+ <!--Next, set up permissions and roles, and test bigbird2010 and elmo2010. -->\r
+ <test ID="permBigbird" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions</uri>\r
+ <filename>security/1-bigbird-permission.xml</filename>\r
+ </test>\r
+ <test ID="roleTestCM" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/roles</uri>\r
+ <filename>security/3-role-test-cm.xml</filename>\r
+ </test>\r
+ <test ID="accountBigbird">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/accounts</uri>\r
+ <filename>security/5-account-bigbird.xml</filename>\r
+ </test>\r
+ <test ID="accountrolesBigbird">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/accounts/${accountBigbird.CSID}/accountroles</uri>\r
+ <filename>security/7-accountroles-bigbird.xml</filename>\r
+ </test>\r
+ <test ID="bigbirdPermroles">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions/${permBigbird.CSID}/permroles</uri>\r
+ <filename>security/9-permissionroles-bigbird.xml</filename>\r
+ </test>\r
+ \r
+ <!-- NOW TRY CRUDL BY BIGBIRD -->\r
+ \r
+ <test ID="dimensionBigbird_POST" auth="bigbird2010">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_PUT">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/dimensions/${dimensionBigbird_POST.CSID}</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/2-put.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_GET">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <fromTestID>dimensionBigbird_POST</fromTestID>\r
+ </test>\r
+ <test ID="dimensionBigbird_DELETE" auth="bigbird2010">\r
+ <method>DELETE</method>\r
+ <fromTestID>dimensionBigbird_POST</fromTestID>\r
+ </test>\r
+ \r
+ <!-- NOW **REMOVE** PERMROLES FROM BIGBIRD -->\r
+ \r
+ <test ID="deletePermrolesBigbird" auth="test">\r
+ <msg>Deleting permroles from bigbird2010</msg>\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/authorization/permissions/${permBigbird.CSID}/permroles</uri>\r
+ </test>\r
+ \r
+ <!-- NOW TRY CRUDL BY BIGBIRD WITH NO PERMROLES -->\r
+ \r
+ <test ID="dimensionBigbird_POST_AfterPermrolesDeleted" auth="bigbird2010">\r
+ <msg>Trying to POST after permroles removed from Bigbird</msg>\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_PUT_AfterPermrolesDeleted">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/dimensions/${dimensionBigbird_POST_AfterPermrolesDeleted.CSID}</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/2-put.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_GET_AfterPermrolesDeleted">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <fromTestID>dimensionBigbird_POST_AfterPermrolesDeleted</fromTestID>\r
+ </test>\r
+ <test ID="dimensionBigbird_DELETE_AfterPermrolesDeleted" auth="bigbird2010">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>DELETE</method>\r
+ <fromTestID>dimensionBigbird_POST_AfterPermrolesDeleted</fromTestID>\r
+ </test>\r
+\r
+ <!-- NOW **ADD** PERMS CRU TO BIGBIRD -->\r
+\r
+ <test ID="permBigbird_CRU" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions</uri>\r
+ <filename>security/11-bigbird-permission-CRU.xml</filename>\r
+ </test>\r
+ <test ID="bigbirdPermrolesCRU" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions/${permBigbird_CRU.CSID}/permroles</uri>\r
+ <filename>security/11-permissionroles-bigbird-CRU.xml</filename>\r
+ </test>\r
+ \r
+ <!-- NOW TRY CRUDL BY BIGBIRD BUT WITH CRU ADDED -->\r
+\r
+ <test ID="dimensionBigbird_POST_CRU" auth="bigbird2010">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_PUT_CRU">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/dimensions/${dimensionBigbird_POST_CRU.CSID}</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/2-put.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_GET_CRU">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <fromTestID>dimensionBigbird_POST_CRU</fromTestID>\r
+ </test>\r
+ <test ID="dimensionBigbird_DELETE_CRU">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>DELETE</method>\r
+ <fromTestID>dimensionBigbird_POST_CRU</fromTestID>\r
+ </test>\r
+\r
+ <!-- NOW **REMOVE** PERMROLES FROM BIGBIRD -->\r
+ \r
+ <test ID="deletePermrolesBigbird" auth="test">\r
+ <msg>Deleting permroles from bigbird2010</msg>\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/authorization/permissions/${permBigbird_CRU.CSID}/permroles</uri>\r
+ </test>\r
+ \r
+ <!-- NOW **ADD** PERMS R TO BIGBIRD -->\r
+\r
+ <test ID="permBigbird_R" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions</uri>\r
+ <filename>security/12-bigbird-permission-R.xml</filename>\r
+ </test>\r
+ <test ID="bigbirdPermroles_R" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/authorization/permissions/${permBigbird_R.CSID}/permroles</uri>\r
+ <filename>security/12-permissionroles-bigbird-R.xml</filename>\r
+ </test>\r
+\r
+ <!-- NOW TRY CRUDL BY BIGBIRD with R only -->\r
+ \r
+ <test ID="dimensionBigbird_POST_R" auth="bigbird2010">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_PUT_R">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/dimensions/${dimensionBigbird_POST_R.CSID}</uri>\r
+ <part>\r
+ <label>dimensions_common</label>\r
+ <filename>dimension/2-put.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="dimensionBigbird_GET_R">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/dimensions/</uri>\r
+ <fromTestID>dimensionBigbird_POST_R</fromTestID>\r
+ </test>\r
+ <test ID="dimensionBigbird_DELETE_R">\r
+ <expectedCodes>404</expectedCodes>\r
+ <method>DELETE</method>\r
+ <fromTestID>dimensionBigbird_POST_R</fromTestID>\r
+ </test>\r
+ \r
+ <!-- CLEANUP -->\r
+ <test auth="test">\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/accounts/${accountBigbird.CSID}/accountroles</uri>\r
+ </test>\r
+ <test ID="securityCleanupRoleTestCM">\r
+ <method>DELETE</method>\r
+ <fromTestID>roleTestCM</fromTestID>\r
+ </test>\r
+ <test ID="securityCleanupAccountBigbird">\r
+ <method>DELETE</method>\r
+ <fromTestID>accountBigbird</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <!-- proposed simplification for re-runs:\r
+ <test rerunID="dimensionBigbird" testGroupID="dimensionCRUDL">\r
+ <expectedCodes>404</expectedCodes>\r
+ </test>\r
+ -->\r
+\r
+</xmlReplay>\r
+ \r
+
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <resourceName>dimensions</resourceName>\r
+ <action>\r
+ <name>CREATE</name>\r
+ </action>\r
+ <action>\r
+ <name>READ</name>\r
+ </action>\r
+ <action>\r
+ <name>UPDATE</name>\r
+ </action>\r
+ <action>\r
+ <name>DELETE</name>\r
+ </action>\r
+ <effect>PERMIT</effect>\r
+</ns2:permission>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission_role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <permission>\r
+ <permissionId>${permElmo.CSID}</permissionId>\r
+ <resourceName>dimensions</resourceName>\r
+ </permission>\r
+ <role>\r
+ <roleId>${roleIntern.CSID}</roleId>\r
+ <roleName>ROLE_TEST_INTERN</roleName>\r
+ </role>\r
+</ns2:permission_role>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <resourceName>dimensions</resourceName>\r
+ <action>\r
+ <name>CREATE</name>\r
+ </action>\r
+ <action>\r
+ <name>READ</name>\r
+ </action>\r
+ <action>\r
+ <name>UPDATE</name>\r
+ </action>\r
+ <effect>PERMIT</effect>\r
+</ns2:permission>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission_role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <permission>\r
+ <permissionId>${permBigbird_CRU.CSID}</permissionId>\r
+ <resourceName>dimensions</resourceName>\r
+ </permission>\r
+ <role>\r
+ <roleId>${roleTestCM.CSID}</roleId>\r
+ <roleName>ROLE_TEST_CM</roleName>\r
+ </role>\r
+</ns2:permission_role>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <resourceName>dimensions</resourceName>\r
+ <action>\r
+ <name>READ</name>\r
+ </action>\r
+ <effect>PERMIT</effect>\r
+</ns2:permission>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission_role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <permission>\r
+ <permissionId>${permBigbird_R.CSID}</permissionId>\r
+ <resourceName>dimensions</resourceName>\r
+ </permission>\r
+ <role>\r
+ <roleId>${roleTestCM.CSID}</roleId>\r
+ <roleName>ROLE_TEST_CM</roleName>\r
+ </role>\r
+</ns2:permission_role>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission_role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <permission>\r
+ <permissionId>${permBigbird_R.CSID}</permissionId>\r
+ <resourceName>dimensions</resourceName>\r
+ </permission>\r
+ <role>\r
+ <roleId>${roleTestCM.CSID}</roleId>\r
+ <roleName>ROLE_TEST_CM</roleName>\r
+ </role>\r
+</ns2:permission_role>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <resourceName>dimensions</resourceName>\r
+ <action>\r
+ <name>READ</name>\r
+ </action>\r
+ <effect>PERMIT</effect>\r
+</ns2:permission>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <roleName>ROLE_TEST_CM</roleName>\r
+ <description>role for ROLE_TEST_CM</description>\r
+</ns2:role>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:role xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <roleName>ROLE_TEST_INTERN</roleName>\r
+ <description>role for ROLE_TEST_INTERN</description>\r
+</ns2:role>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:accounts_common\r
+xmlns:ns2="http://collectionspace.org/services/account"\r
+xmlns:ns3="http://collectionspace.org/services/hyperjaxb">\r
+ <screenName>bigbird2010</screenName>\r
+ <personRefName>bigbird2010</personRefName>\r
+ <email>bigbird@cspace.org</email>\r
+ <phone>1234567890</phone>\r
+ <userId>bigbird2010</userId>\r
+ <password>YmlnYmlyZDIwMTA=</password>\r
+ <tenants>\r
+ <tenant_id>1</tenant_id>\r
+ </tenants>\r
+</ns2:accounts_common>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:accounts_common\r
+xmlns:ns2="http://collectionspace.org/services/account"\r
+xmlns:ns3="http://collectionspace.org/services/hyperjaxb">\r
+ <screenName>elmo2010</screenName>\r
+ <personRefName>elmo2010</personRefName>\r
+ <email>elmo@cspace.org</email>\r
+ <phone>1234567890</phone>\r
+ <userId>elmo2010</userId>\r
+ <password>ZWxtbzIwMTA=</password>\r
+ <tenants>\r
+ <tenant_id>1</tenant_id>\r
+ </tenants>\r
+</ns2:accounts_common>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:account_role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <subject>ROLE</subject>\r
+ <account>\r
+ <accountId>${accountBigbird.CSID}</accountId>\r
+ <screenName>bigbird2010</screenName>\r
+ <userId>bigbird2010</userId>\r
+ </account>\r
+ <role>\r
+ <roleId>${roleTestCM.CSID}</roleId>\r
+ <roleName>ROLE_TEST_CM</roleName>\r
+ </role>\r
+</ns2:account_role>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:account_role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <subject>ROLE</subject>\r
+ <account>\r
+ <accountId>${permElmo.CSID}</accountId>\r
+ <screenName>elmo2010</screenName>\r
+ <userId>elmo2010</userId>\r
+ </account>\r
+ <role>\r
+ <roleId>${roleIntern.CSID}</roleId>\r
+ <roleName>ROLE_TEST_INTERN</roleName>\r
+ </role>\r
+</ns2:account_role>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
+<ns2:permission_role\r
+xmlns:ns2="http://collectionspace.org/services/authorization">\r
+ <permission>\r
+ <permissionId>${permBigbird.CSID}</permissionId>\r
+ <resourceName>dimensions</resourceName>\r
+ </permission>\r
+ <role>\r
+ <roleId>${roleTestCM.CSID}</roleId>\r
+ <roleName>ROLE_TEST_CM</roleName>\r
+ </role>\r
+</ns2:permission_role>\r
+\r
--- /dev/null
+ bigbird2010\r
+ bsh % unp = "bigbird2010:bigbird2010";\r
+ <bigbird2010bigbird2010>\r
+ bsh % String encoding = new sun.misc.BASE64Encoder().encode (unp.getBytes());\r
+ bsh % encoding = new sun.misc.BASE64Encoder().encode (unp.getBytes());\r
+ <YmlnYmlyZDIwMTBiaWdiaXJkMjAxMA==>\r
+ \r
+ bsh % unp = "bigbird2010:bigbird2010";\r
+ <bigbird2010:bigbird2010>\r
+ bsh % encoding = new sun.misc.BASE64Encoder().encode (unp.getBytes());\r
+ <YmlnYmlyZDIwMTA6YmlnYmlyZDIwMTA=>\r
+ \r
+ bsh % String decode(String s){return new String(Base64.decode(s.getBytes()));}\r
+ \r
+ bsh % decode("dGVzdC1wYWhtYTp0ZXN0");\r
+ test-pahma:test\r
+ //used for DELETE /cspace-services/accounts/9230dc97-0888-4252-8c89-795c92305ca0 HTTP/1.1\r
+ \r
+ //used for creating accounts, roles, etc:\r
+ bsh % decode("dGVzdDp0ZXN0");\r
+ test:test\r
+ \r
+ //used for dimension service tests:\r
+ bsh % decode("dXNlcjFAbXVzZXVtMS5vcmc6dXNlcjFAbXVzZXVtMS5vcmc=");\r
+ user1@museum1.org:user1@museum1.org\r
+ \r
+ dGVzdDpudWxs\r
+ bsh % decode("dGVzdDpudWxs");\r
+ test:null (no password)\r
+ ==> HTTP/1.1 401 Password Incorrect/Password Required\r
+ \r
+ bsh % decode("dXNlcjJAbXVzZXVtMi5vcmc6dXNlcjJAbXVzZXVtMi5vcmc=");\r
+ user2@museum2.org:user2@museum2.org\r
+ DELETE OK on DELETE /cspace-services/dimensions/7922ea12-401d-4a7b-9f1a HTTP/1.1\r
+\r
+ dGVzdDpiYXI=\r
+ test:bar\r
+ //used for incorrect password.\r
+ Some more forbidden auths:\r
+ bsh % decode("YmFieWJvcDpiYWJ5Ym9wMDk=");\r
+ babybop:babybop09\r
+ bsh % decode("YmFybmV5OmJhcm5leTA4");\r
+ barney:barney08\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <!--\r
+ How to use this file.\r
+ ======================\r
+ From a command-line, run, for example:\r
+ cd C:\cs\trunk\services\common-test\r
+ mvn exec:java\r
+ To run one testGroup with ID="2collectionobjects", use:\r
+ mvn -DtestGroupID=2collectionobjects exec:java\r
+\r
+ To run one test with ID="1001" in one testGroup "2collectionobjects", use:\r
+ mvn -DtestGroupID=2collectionobjects -DtestID=1001 exec:java\r
+\r
+ If you need to compile, you can use:\r
+ mvn -q install exec:java\r
+\r
+ To make maven a bit more quiet (all the lovely INFO lines) run with\r
+ mvn -q\r
+ This class is not a test class, so if you want to skip other test classes, use\r
+ mvn -DskipTests\r
+ Example:\r
+ mvn -q -DskipTests exec:java\r
+\r
+ Maven knows where to find the command line args. It looks in the pom:\r
+ C:\cs\trunk\services\common-test\pom.xml\r
+ for the values under the element:\r
+ /project/build/plugins/plugin/artifactId[exec-maven-plugin]\r
+ However, you may override this with a full path\r
+ mvn -DxmlReplayBaseDir="C:\tmp\xmlReplay" exec:java\r
+ \r
+ It always looks for this master config file, named "xml-replay-config.xml"\r
+\r
+ For URLs, any ampersands must be escaped in this file in query strings like so: &\r
+\r
+ The attribute\r
+ /testGroup/test/@ID\r
+ is optional. If present, it may be referred to in a DELETE using\r
+ /testGroup/test/fromTestID/\r
+ If it is not present, the driver will use\r
+ /testGroup/test/part/filename\r
+ as the ID for POST tests.\r
+ If the attribute\r
+ /testGroup/@autoDeletePOSTS\r
+ is "true" then any POSTs that are sent that return a "Location:" header\r
+ will be deleted with DELETE at the end of the test group.\r
+ Alternately, you may delete them\r
+ manually by providing a DELETE test as specified above.\r
+\r
+ PUT methods also use the\r
+ /testGroup/test/fromTestID/\r
+ value to update the object posted by a POST test.\r
+\r
+ -->\r
+ <testGroup ID="2collectionobjects" autoDeletePOSTS="true">\r
+ <test ID="1001">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp1.xml</filename>\r
+ </part>\r
+ </test>\r
+\r
+ <test ID="1002">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp2.xml</filename>\r
+ </part>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <testGroup ID="2parts" autoDeletePOSTS="true">\r
+ <test ID="nh">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <parts>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/nh-collectionobject.xml</filename>\r
+ </part>\r
+ <part>\r
+ <label>collectionobjects_naturalhistory</label>\r
+ <filename>collectionobject/nh-part.xml</filename>\r
+ </part>\r
+ </parts>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>nh</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <testGroup ID="collectionobjects" autoDeletePOSTS="true">\r
+ <test ID="1001">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="1002">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp2.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp3.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>DELETE</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>1001</fromTestID>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_whitesp4.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/cspace-2242-first-value-instance-blank.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/cspace-2242-first-value-instance-nonblank.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/repfield_null1.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/?sortBy=&pgNum=0&pgSz=8</uri>\r
+ </test>\r
+ <test ID="cambridge-1">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>cambridge-1</fromTestID>\r
+ </test>\r
+ <test ID="cambridge-1-put">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge-update.xml</filename>\r
+ </part>\r
+ <fromTestID>cambridge-1</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <!-- You can run this with\r
+ mvn -q -DtestGroupID=cambridge-put-demo exec:java\r
+ -->\r
+ <testGroup ID="cambridge-put-demo" autoDeletePOSTS="true">\r
+ <test ID="cambridge-2">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <fromTestID>cambridge-2</fromTestID>\r
+ </test>\r
+ <test ID="cambridge-2-put">\r
+ <method>PUT</method>\r
+ <uri>/cspace-services/collectionobjects/</uri>\r
+ <part>\r
+ <label>collectionobjects_common</label>\r
+ <filename>collectionobject/testCambridge-update.xml</filename>\r
+ </part>\r
+ <fromTestID>cambridge-2</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+ <!-- You can run this with\r
+ mvn -q -DtestGroupID=authrefs exec:java\r
+ -->\r
+ <testGroup ID="authrefs" autoDeletePOSTS="true">\r
+ <test ID="newPersonAuthority">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <part>\r
+ <label>personauthorities_common</label>\r
+ <filename>authrefs/newPersonAuthority.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test>\r
+ <method>GET</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <fromTestID>newPersonAuthority</fromTestID>\r
+ </test>\r
+ <test ID="newPerson">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <part>\r
+ <label>persons_common</label>\r
+ <filename>authrefs/newPerson.xml</filename>\r
+ </part>\r
+ <fromTestID>newPersonAuthority</fromTestID>\r
+ </test>\r
+\r
+ <test ID="personAuthsList">\r
+ <method>LIST</method>\r
+ <uri>/cspace-services/personauthorities/</uri>\r
+ <fromTestID>newPersonAuthority</fromTestID>\r
+ </test>\r
+ </testGroup>\r
+\r
+\r
+\r
+\r
+ \r
+\r
+\r
+</xmlReplay>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplayMaster>\r
+ <protoHostPort>http://localhost:8180</protoHostPort>\r
+ \r
+ <!-- legal values for dumpServiceResult=[minimal,detailed,full] -->\r
+ <dump payloads="false" dumpServiceResult="minimal" />\r
+ \r
+ <auths default="test">\r
+ <auth ID="test">dGVzdDp0ZXN0</auth>\r
+ </auths>\r
+\r
+ \r
+ <run controlFile="./xml-replay-self-test.xml" testGroup="selftestGroup" />\r
+\r
+</xmlReplayMaster>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplayMaster>\r
+ <protoHostPort>http://localhost:8180</protoHostPort>\r
+ \r
+ <!-- legal values for dumpServiceResult=[minimal,detailed,full] -->\r
+ <dump payloads="false" dumpServiceResult="minimal" />\r
+ \r
+ <auths default="test">\r
+ <auth ID="test">dGVzdDp0ZXN0</auth>\r
+ </auths>\r
+\r
+ <!--\r
+ This used to work, but for check-in, I'm commenting it out as it currently breaks if things are left around in DB.\r
+ <run controlFile="./security.xml" testGroup="security" />\r
+ -->\r
+\r
+ <!--\r
+ This was working but is not now because security db hangs onto results from failed tests.\r
+ However, it is more complete than testGroup="security", so is the correct testGroup to run.\r
+ When the DB is cleaned with [ant create_db import] it runs OK.\r
+ <run controlFile="./security.xml" testGroup="securityRemovingRoleperms" />\r
+ -->\r
+\r
+ <run controlFile="./organization.xml" testGroup="organization" />\r
+\r
+</xmlReplayMaster>\r
+\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<xmlReplay>\r
+ <testGroup ID="selftestGroup" autoDeletePOSTS="true">\r
+ <test ID="OrgAuth1" auth="test">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/orgauthorities/</uri>\r
+ <part>\r
+ <label>orgauthorities_common</label>\r
+ <filename>organization/orgauthorities_common.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="Org1">\r
+ <method>POST</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}/items/</uri>\r
+ <part>\r
+ <label>organizations_common</label>\r
+ <filename>organization/organizations_common.xml</filename>\r
+ </part>\r
+ </test>\r
+ <test ID="getOrg1">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}/items/${Org1.CSID}</uri>\r
+ </test>\r
+ <test ID="getItems">\r
+ <method>GET</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}</uri>\r
+ </test>\r
+ <test ID="oneOrgLIST">\r
+ <method>LIST</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}</uri>\r
+ </test>\r
+ <test ID="organizationLIST2">\r
+ <method>LIST</method>\r
+ <uri>/cspace-services/orgauthorities/${OrgAuth1.CSID}/items/</uri>\r
+ </test>\r
+ </testGroup>\r
+</xmlReplay>\r