]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5985: Making fixes for failed test results.
authorremillet <remillet@yahoo.com>
Mon, 27 Mar 2017 20:41:19 +0000 (13:41 -0700)
committerremillet <remillet@yahoo.com>
Mon, 27 Mar 2017 20:41:19 +0000 (13:41 -0700)
16 files changed:
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/TestCreateAndLinkLoanOutBatchJob.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/account-create-bigbird.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/accountroles-post-bigbird.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-Template.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-permissions.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-roles.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-invoke-nocontext.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-update-object-loc.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch.xml
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (2).xml [deleted file]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (3).xml [deleted file]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (4).xml [deleted file]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (5).xml [deleted file]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/permissionroles-post-bird.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/role-create-bird.xml [new file with mode: 0644]
services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml

diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/TestCreateAndLinkLoanOutBatchJob.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/TestCreateAndLinkLoanOutBatchJob.xml
new file mode 100644 (file)
index 0000000..1afd0ac
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<document name="batch">
+    <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch" xmlns:ns3="http://collectionspace.org/services/jaxb">
+        <name>TestCreateAndLinkLoanOutBatchJob</name>
+        <notes>This should be interesting</notes>
+        <forDocTypes>
+            <forDocType>CollectionObject</forDocType>
+        </forDocTypes>
+        <supportsSingleDoc>true</supportsSingleDoc>
+        <supportsDocList>true</supportsDocList>
+        <createsNewFocus>true</createsNewFocus>
+        <className>org.collectionspace.services.batch.nuxeo.CreateAndLinkLoanOutBatchJob</className>
+    </ns2:batch_common>
+</document>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/account-create-bigbird.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/account-create-bigbird.xml
new file mode 100644 (file)
index 0000000..82c7c39
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:accounts_common xmlns:ns2="http://collectionspace.org/services/account" xmlns:ns3="http://collectionspace.org/services/hyperjaxb">
+    <screenName>${screenName}</screenName>
+    <email>${email}</email>
+    <phone>1234567890</phone>
+    <userId>${userId}</userId>
+    <!-- Password is bigbird2010 base 64 encoded -->
+    <password>${password}</password>
+    <tenants>
+        <tenant_id>1</tenant_id>
+    </tenants>
+</ns2:accounts_common>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/accountroles-post-bigbird.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/accountroles-post-bigbird.xml
new file mode 100644 (file)
index 0000000..834f757
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:account_role xmlns:ns2="http://collectionspace.org/services/authorization">
+    <subject>ROLE</subject>
+    <account>
+        <accountId>${createAccount.CSID}</accountId>
+        <screenName>${screenName}</screenName>
+        <userId>${userId}</userId>
+    </account>
+    <role>
+        <roleId>${createRole.CSID}</roleId>
+        <roleName>ROLE_1_BIRD</roleName>
+    </role>
+</ns2:account_role>
index 00cbca7d95c0a7d2f38d739c1187deee88838946..48f278dbdc82b1e237ae9472c8445166d35d7182 100644 (file)
@@ -1,37 +1,43 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<ns:batch_common xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:ns="http://collectionspace.org/services/batch" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://collectionspace.org/services/batch file:batch_common.xsd">
-    <name>name0</name>
-    <notes>notes0</notes>
-    <forDocTypes>
-        <forDocType>CollectionObject</forDocType>
-        <forDocType>Intake</forDocType>
-    </forDocTypes>
-    <forRoles>
-        <roleDisplayName>TENANT_READER</roleDisplayName>
-        <roleDisplayName>TENANT_ADMINISTRATOR</roleDisplayName>
-    </forRoles>
-    <resourceActionGroupList>
-        <resourceActionGroup>
-            <resourceName>blobs</resourceName>
-            <actionGroup>CRUL</actionGroup>
-        </resourceActionGroup>
-        <resourceActionGroup>
-            <resourceName>media</resourceName>
-            <actionGroup>CRUL</actionGroup>
-        </resourceActionGroup>
-        <resourceActionGroup>
-            <resourceName>concepts</resourceName>
-            <actionGroup>RL</actionGroup>
-        </resourceActionGroup>
-        <resourceActionGroup>
-            <resourceName>collectionobjects</resourceName>
-            <actionGroup>RL</actionGroup>
-        </resourceActionGroup>
-    </resourceActionGroupList>
-    <supportsNoContext>false</supportsNoContext>
-    <supportsSingleDoc>false</supportsSingleDoc>
-    <supportsDocList>false</supportsDocList>
-    <supportsGroup>false</supportsGroup>
-    <createsNewFocus>false</createsNewFocus>
-    <className>className0</className>
-</ns:batch_common>
+<ns:document xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+    xmlns:ns="http://collectionspace.org/services/batch"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://collectionspace.org/services/batch file:../../../../../../../batch/jaxb/src/main/resources/batch_common_document.xsd">
+    <batch_common xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:ns="http://collectionspace.org/services/batch" 
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+        <name>name0</name>
+        <notes>notes0</notes>
+        <forDocTypes>
+            <forDocType>CollectionObject</forDocType>
+            <forDocType>Intake</forDocType>
+        </forDocTypes>
+        <forRoles>
+            <roleDisplayName>TENANT_READER</roleDisplayName>
+            <roleDisplayName>TENANT_ADMINISTRATOR</roleDisplayName>
+        </forRoles>
+        <resourceActionGroupList>
+            <resourceActionGroup>
+                <resourceName>blobs</resourceName>
+                <actionGroup>CRUL</actionGroup>
+            </resourceActionGroup>
+            <resourceActionGroup>
+                <resourceName>media</resourceName>
+                <actionGroup>CRUL</actionGroup>
+            </resourceActionGroup>
+            <resourceActionGroup>
+                <resourceName>concepts</resourceName>
+                <actionGroup>RL</actionGroup>
+            </resourceActionGroup>
+            <resourceActionGroup>
+                <resourceName>collectionobjects</resourceName>
+                <actionGroup>RL</actionGroup>
+            </resourceActionGroup>
+        </resourceActionGroupList>
+        <supportsNoContext>false</supportsNoContext>
+        <supportsSingleDoc>false</supportsSingleDoc>
+        <supportsDocList>false</supportsDocList>
+        <supportsGroup>false</supportsGroup>
+        <createsNewFocus>false</createsNewFocus>
+        <className>className0</className>
+    </batch_common>
+</ns:document>
index 1ff6409d2b88ef2b6dc6f8ef020b7e3377aab9a3..479ea3d8104086573515e7a61fe14949d805d537 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <document name="batch">
-    <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch" xmlns:ns3="http://collectionspace.org/services/jaxb">
+    <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch">
         <name>batch-create-permissions</name>
         <notes>A batch resource for testing the Batch service's permission enforcement before invoking batch jobs.</notes>
         <resourceActionGroupList>
@@ -13,8 +13,8 @@
                 <actionGroup>CRUL</actionGroup>
             </resourceActionGroup>
             <resourceActionGroup>
-                <resourceName>concepts</resourceName>
-                <actionGroup>RL</actionGroup>
+                <resourceName>conceptauthorities</resourceName>
+                <actionGroup>CRL</actionGroup>
             </resourceActionGroup>
             <resourceActionGroup>
                 <resourceName>collectionobjects</resourceName>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-roles.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-roles.xml
new file mode 100644 (file)
index 0000000..4de4837
--- /dev/null
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<document name="batch">
+    <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch">
+        <name>batch-create-roles</name>
+        <notes>A batch job record for testing the batch service's authz enforcement or roles before running a batch job.</notes>
+        <forRoles>
+            <roleDisplayName>TENANT_READER</roleDisplayName>
+            <roleDisplayName>TENANT_ADMINISTRATOR</roleDisplayName>
+        </forRoles>
+        <supportsNoContext>true</supportsNoContext>
+        <className>org.collectionspace.services.batch.nuxeo.TestBatchJob</className>
+    </ns2:batch_common>
+</document>
index 340e4d989252c55494e0355a8ad0d60f447af08b..ffc1f3f1818c0409c5a954ef7e72fcd67462e7a5 100644 (file)
@@ -3,5 +3,5 @@
     Valid modes - {"single", "list", "group", "nocontext"}
 -->
 <ns2:invocationContext xmlns:ns2="http://collectionspace.org/services/common/invocable" xmlns:ns3="http://collectionspace.org/services/jaxb">
-    <mode>nocontexty</mode>
+    <mode>nocontext</mode>
 </ns2:invocationContext>
index ffdd76cde0ebdbd5dc3630a5caf0075fed200793..9e011213aa2037af50a848fd72212481d48d88c8 100644 (file)
                 <expected level="ADDOK" />
                 <filename>batch/res/collectionobject.res.xml</filename>
                 <vars>
-                    <var ID="computedCurrentLocationValue">${createMovement2.currentLocation}</var>
+                    <var ID="computedCurrentLocationValue">${createMovement1.currentLocation}</var>
                 </vars>
             </response>
             <expectedCodes>200</expectedCodes>
index c7d195cc48fc22a30e9be716fd3ba852db80133b..1621f330ca399c16f5ffa757cad88f6b13531a1b 100644 (file)
        <auths>
                <!-- IMPORTANT: THESE ARE STICKY :: THEY STICK AROUND UNTIL RESET, IN EXEC ORDER OF THIS FILE. -->
                <auth ID="admin@core.collectionspace.org">YWRtaW5AY29yZS5jb2xsZWN0aW9uc3BhY2Uub3JnOkFkbWluaXN0cmF0b3I=</auth>
-               <auth ID="reader@core.collectionspace.org">cmVhZGVyQGNvcmUuY29sbGVjdGlvbnNwYWNlLm9yZzpyZWFkZXI=</auth>
-               <auth ID="testAdministator">YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y</auth>
+           <auth ID="bigbird@cspace.org">YmlnYmlyZEBjc3BhY2Uub3JnOkFkbWluaXN0cmF0b3I=</auth>
        </auths>
        
        <testGroup ID="testPermissionsAndRoles" autoDeletePOSTS="true">
-               <test ID="createBatchPermissions" auth="test">
+           <!-- 
+              Setup accounts, roles, and permissions for tests.
+           -->
+           <test ID="createAccount" auth="admin@core.collectionspace.org">
+               <method>POST</method>
+               <uri>/cspace-services/accounts</uri>
+               <filename>batch/account-create-bigbird.xml</filename>
+               <vars>
+                   <var ID="email">bigbird@cspace.org</var>
+                   <var ID="screenName">bigbird@cspace.org</var>
+                   <var ID="userId">bigbird@cspace.org</var>
+                   <var ID="password">QWRtaW5pc3RyYXRvcg==</var>  <!-- This value is the string "Administrator" base64 encoded. -->
+               </vars>
+           </test>
+           <test ID="createRole">
+               <method>POST</method>
+               <uri>/cspace-services/authorization/roles</uri>
+               <filename>batch/role-create-bird.xml</filename>
+           </test>
+           <test ID="permissionroles-post-bird" autoDeletePOSTS="false">
+               <method>POST</method>
+               <uri>/cspace-services/authorization/roles/${createRole.CSID}/permroles</uri>
+               <filename>batch/permissionroles-post-bird.xml</filename>
+           </test>
+           <test ID="accountroles-post-bigbird" autoDeletePOSTS="false">
+               <method>POST</method>
+               <uri>/cspace-services/accounts/${createAccount.CSID}/accountroles</uri>
+               <filename>batch/accountroles-post-bigbird.xml</filename>
+               <vars>
+                   <var ID="screenName">bigbird@cspace.org</var>
+                   <var ID="userId">bigbird@cspace.org</var>
+               </vars>
+           </test>
+           
+           <!-- 
+               Test batch service's PERMISSION enforcement for running batch jobs
+           -->
+           <test ID="createBatchPermissions">
                        <method>POST</method>
                        <uri>/cspace-services/batch/</uri>
                        <filename>batch/batch-create-permissions.xml</filename>
                </test>
-               <test ID="testInvokeNoContext" auth="test" autoDeletePOSTS="false">
+           <test ID="testInvokeNoContext" auth="admin@core.collectionspace.org" autoDeletePOSTS="false">
                        <method>POST</method>
                        <uri>/cspace-services/batch/${createBatchPermissions.CSID}</uri>
                        <filename>batch/batch-invoke-nocontext.xml</filename>
-               </test>         
+               </test>
+           <test ID="testInvokeNoContext" auth="bigbird@cspace.org" autoDeletePOSTS="false">
+               <method>POST</method>
+               <uri>/cspace-services/batch/${createBatchPermissions.CSID}</uri>
+               <filename>batch/batch-invoke-nocontext.xml</filename>
+                       <expectedCodes>403</expectedCodes>
+           </test>
+           
+           <!-- 
+              Test batch service's ROLE enforcement for running batch jobs 
+           -->
+           <test ID="createBatchRoles">
+               <method>POST</method>
+               <uri>/cspace-services/batch/</uri>
+               <filename>batch/batch-create-roles.xml</filename>
+           </test>
+           <test ID="testInvokeNoContext" auth="admin@core.collectionspace.org" autoDeletePOSTS="false">
+               <method>POST</method>
+               <uri>/cspace-services/batch/${createBatchRoles.CSID}</uri>
+               <filename>batch/batch-invoke-nocontext.xml</filename>
+           </test>
+           <test ID="testInvokeNoContext" auth="bigbird@cspace.org" autoDeletePOSTS="false">
+               <method>POST</method>
+               <uri>/cspace-services/batch/${createBatchRoles.CSID}</uri>
+               <filename>batch/batch-invoke-nocontext.xml</filename>
+               <expectedCodes>403</expectedCodes>
+           </test>
        </testGroup>
        
        <testGroup ID="testSingle" autoDeletePOSTS="true">
-               <test ID="createBatch1" auth="test">
-                       <method>POST</method>
-                       <uri>/cspace-services/batch/</uri>
-                       <filename>batch/batch1.xml</filename>
-               </test>
-               <test ID="createBatch2" auth="test">
+           <test ID="TestCreateAndLinkLoanOutBatchJob" auth="test">
                        <method>POST</method>
                        <uri>/cspace-services/batch/</uri>
-                       <filename>batch/batch2.xml</filename>
+                   <filename>batch/TestCreateAndLinkLoanOutBatchJob.xml</filename>
                </test>
-               <test ID="createBatch" auth="test">
+               <test ID="createCollObj1" auth="test">
                        <method>POST</method>
                        <uri>/cspace-services/collectionobjects/</uri>
                        <filename>batch/collObj1.xml</filename>
                </test>
                <test ID="testInvokeSingle" auth="test" autoDeletePOSTS="false">
                        <method>POST</method>
-                       <uri>/cspace-services/batch/${createBatch1.CSID}</uri>
-                       <filename>batch/batchInvContextSingle.xml</filename>
+                   <uri>/cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID}</uri>
+                   <filename>batch/batch-invoke-single.xml</filename>
                        <vars>
-                               <var ID="CollObj1">${createBatch.CSID}</var>
+                               <var ID="CollObj1">${createCollObj1.CSID}</var>
                        </vars>
                </test>
                <test ID="testInvokeList" auth="test" autoDeletePOSTS="false">
                        <method>POST</method>
-                       <uri>/cspace-services/batch/${createBatch1.CSID}</uri>
-                       <filename>batch/batchInvContextList.xml</filename>
+                       <uri>/cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID}</uri>
+                   <filename>batch/batch-invoke-list.xml</filename>
                        <vars>
-                               <var ID="CollObj1">${createBatch.CSID}</var>
+                               <var ID="CollObj1">${createCollObj1.CSID}</var>
                        </vars>
                </test>
                <test ID="testBadInvoke" auth="test" autoDeletePOSTS="false">
                        <method>POST</method>
                        <expectedCodes>400</expectedCodes>
-                       <uri>/cspace-services/batch/${createBatch1.CSID}</uri>
-                       <filename>batch/batchBadInvContext.xml</filename>
+                       <uri>/cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID}</uri>
+                   <filename>batch/batch-invoke-gargabe.xml</filename>
                        <vars>
-                               <var ID="CollObj1">${createBatch.CSID}</var>
+                               <var ID="CollObj1">${createCollObj1.CSID}</var>
                        </vars>
                </test>
                <test ID="testInvokeEmptyList" auth="test" autoDeletePOSTS="false">
                        <method>POST</method>
                        <expectedCodes>400</expectedCodes>
-                       <uri>/cspace-services/batch/${createBatch1.CSID}</uri>
-                       <filename>batch/batchBadInvContextList.xml</filename>
+                       <uri>/cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID}</uri>
+                   <filename>batch/batch-invoke-list-empty.xml</filename>
                        <vars>
-                               <var ID="CollObj1">${createBatch.CSID}</var>
+                               <var ID="CollObj1">${createCollObj1.CSID}</var>
                        </vars>
                </test>
                <test ID="testFilteredList1" auth="test">
      <testGroup ID="cleanup" autoDeletePOSTS="true">
          <test ID="cl1"  auth="test">
              <method>DELETE</method>
-             <uri>/cspace-services/batch/${createBatch1.CSID}</uri>
+             <uri>/cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID}</uri>
          </test>
          <test ID="cl2"  auth="test">
              <method>DELETE</method>
-             <uri>/cspace-services/collectionobjects/${createBatch.CSID}</uri>
+             <uri>/cspace-services/collectionobjects/${createCollObj1.CSID}</uri>
          </test>
                         </testGroup>
                         -->
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (2).xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (2).xml
deleted file mode 100644 (file)
index 5864169..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<document name="batch">
-       <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch"
-               xmlns:ns3="http://collectionspace.org/services/jaxb">
-               <name>TestBatchJob</name>
-               <notes>A benign batch job for testing the Batch service.</notes>
-               <forRoles>
-               <roleDisplayName>TENANT_READER</roleDisplayName>
-               <roleDisplayName>TENANT_ADMINISTRATOR</roleDisplayName>
-       </forRoles>
-       <resourceActionGroupList>
-               <resourceActionGroup>
-                   <resourceName>blobs</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>media</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>concepts</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>collectionobjects</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-        </resourceActionGroupList>
-               <supportsNoContext>false</supportsNoContext>
-               <supportsSingleDoc>false</supportsSingleDoc>
-               <supportsDocList>false</supportsDocList>
-               <supportsGroup>false</supportsGroup>
-               <createsNewFocus>false</createsNewFocus>
-               <className>org.collectionspace.services.batch.nuxeo.TestBatchJob</className>
-       </ns2:batch_common>
-</document>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (3).xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (3).xml
deleted file mode 100644 (file)
index 5864169..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<document name="batch">
-       <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch"
-               xmlns:ns3="http://collectionspace.org/services/jaxb">
-               <name>TestBatchJob</name>
-               <notes>A benign batch job for testing the Batch service.</notes>
-               <forRoles>
-               <roleDisplayName>TENANT_READER</roleDisplayName>
-               <roleDisplayName>TENANT_ADMINISTRATOR</roleDisplayName>
-       </forRoles>
-       <resourceActionGroupList>
-               <resourceActionGroup>
-                   <resourceName>blobs</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>media</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>concepts</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>collectionobjects</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-        </resourceActionGroupList>
-               <supportsNoContext>false</supportsNoContext>
-               <supportsSingleDoc>false</supportsSingleDoc>
-               <supportsDocList>false</supportsDocList>
-               <supportsGroup>false</supportsGroup>
-               <createsNewFocus>false</createsNewFocus>
-               <className>org.collectionspace.services.batch.nuxeo.TestBatchJob</className>
-       </ns2:batch_common>
-</document>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (4).xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (4).xml
deleted file mode 100644 (file)
index 5864169..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<document name="batch">
-       <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch"
-               xmlns:ns3="http://collectionspace.org/services/jaxb">
-               <name>TestBatchJob</name>
-               <notes>A benign batch job for testing the Batch service.</notes>
-               <forRoles>
-               <roleDisplayName>TENANT_READER</roleDisplayName>
-               <roleDisplayName>TENANT_ADMINISTRATOR</roleDisplayName>
-       </forRoles>
-       <resourceActionGroupList>
-               <resourceActionGroup>
-                   <resourceName>blobs</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>media</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>concepts</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>collectionobjects</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-        </resourceActionGroupList>
-               <supportsNoContext>false</supportsNoContext>
-               <supportsSingleDoc>false</supportsSingleDoc>
-               <supportsDocList>false</supportsDocList>
-               <supportsGroup>false</supportsGroup>
-               <createsNewFocus>false</createsNewFocus>
-               <className>org.collectionspace.services.batch.nuxeo.TestBatchJob</className>
-       </ns2:batch_common>
-</document>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (5).xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (5).xml
deleted file mode 100644 (file)
index 5864169..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<document name="batch">
-       <ns2:batch_common xmlns:ns2="http://collectionspace.org/services/batch"
-               xmlns:ns3="http://collectionspace.org/services/jaxb">
-               <name>TestBatchJob</name>
-               <notes>A benign batch job for testing the Batch service.</notes>
-               <forRoles>
-               <roleDisplayName>TENANT_READER</roleDisplayName>
-               <roleDisplayName>TENANT_ADMINISTRATOR</roleDisplayName>
-       </forRoles>
-       <resourceActionGroupList>
-               <resourceActionGroup>
-                   <resourceName>blobs</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>media</resourceName>
-                               <actionGroup>CRUL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>concepts</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-               <resourceActionGroup>
-                   <resourceName>collectionobjects</resourceName>
-                               <actionGroup>RL</actionGroup>
-               </resourceActionGroup>
-        </resourceActionGroupList>
-               <supportsNoContext>false</supportsNoContext>
-               <supportsSingleDoc>false</supportsSingleDoc>
-               <supportsDocList>false</supportsDocList>
-               <supportsGroup>false</supportsGroup>
-               <createsNewFocus>false</createsNewFocus>
-               <className>org.collectionspace.services.batch.nuxeo.TestBatchJob</className>
-       </ns2:batch_common>
-</document>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/permissionroles-post-bird.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/permissionroles-post-bird.xml
new file mode 100644 (file)
index 0000000..c5e3482
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:permission_role xmlns:ns2="http://collectionspace.org/services/authorization">
+    <permission>
+        <permissionId>1-objectexit-RL</permissionId>
+        <resourceName>objectexit</resourceName>
+    </permission>    
+    <permission>
+        <permissionId>1-batch-CRUDL</permissionId>
+        <resourceName>batch</resourceName>
+    </permission>
+    <role>
+        <roleId>${createRole.CSID}</roleId>
+        <roleName>ROLE_1_BIRD</roleName>
+    </role>
+</ns2:permission_role>
diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/role-create-bird.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/role-create-bird.xml
new file mode 100644 (file)
index 0000000..bd12dd5
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<ns2:role xmlns:ns2="http://collectionspace.org/services/authorization">
+    <roleName>ROLE_1_BIRD</roleName>
+    <description>Role for testing batch invoke permissions</description>
+</ns2:role>
index 7ed8392e3067b125a08efaa8f32a026651c38b51..796a932c7b187c24c9cf9c13ca4eb95c82bf3a37 100644 (file)
@@ -47,7 +47,8 @@
     
     <run controlFile="versioning/versioning.xml" testGroup="VersionedRecordFiltering" />
     
-    <run controlFile="batch/batch.xml" />
+    <run controlFile="batch/batch.xml" testGroup="testSingle"/>
+    <run controlFile="batch/batch.xml" testGroup="testPermissionsAndRoles"/>
     
     <!-- Uncomment the following when needed to test the UpdateObjectLocationBatchJob -->
     <!-- which updates the computed current location values in CollectionObject records. -->