From 973052d5bc812bb8f3a51df997606b9483b54b80 Mon Sep 17 00:00:00 2001 From: remillet Date: Mon, 27 Mar 2017 13:41:19 -0700 Subject: [PATCH] CSPACE-5985: Making fixes for failed test results. --- .../TestCreateAndLinkLoanOutBatchJob.xml | 14 +++ .../batch/account-create-bigbird.xml | 12 ++ .../batch/accountroles-post-bigbird.xml | 13 ++ .../xmlreplay/batch/batch-create-Template.xml | 78 ++++++------ .../batch/batch-create-permissions.xml | 6 +- .../xmlreplay/batch/batch-create-roles.xml | 13 ++ .../batch/batch-invoke-nocontext.xml | 2 +- .../batch/batch-update-object-loc.xml | 2 +- .../test-data/xmlreplay/batch/batch.xml | 111 +++++++++++++----- .../xmlreplay/batch/batch1 - Copy (2).xml | 36 ------ .../xmlreplay/batch/batch1 - Copy (3).xml | 36 ------ .../xmlreplay/batch/batch1 - Copy (4).xml | 36 ------ .../xmlreplay/batch/batch1 - Copy (5).xml | 36 ------ .../batch/permissionroles-post-bird.xml | 15 +++ .../xmlreplay/batch/role-create-bird.xml | 5 + .../test-data/xmlreplay/xml-replay-master.xml | 3 +- 16 files changed, 205 insertions(+), 213 deletions(-) create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/TestCreateAndLinkLoanOutBatchJob.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/account-create-bigbird.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/accountroles-post-bigbird.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-roles.xml delete mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (2).xml delete mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (3).xml delete mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (4).xml delete mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (5).xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/permissionroles-post-bird.xml create mode 100644 services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/role-create-bird.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 index 000000000..1afd0ac59 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/TestCreateAndLinkLoanOutBatchJob.xml @@ -0,0 +1,14 @@ + + + + TestCreateAndLinkLoanOutBatchJob + This should be interesting + + CollectionObject + + true + true + true + org.collectionspace.services.batch.nuxeo.CreateAndLinkLoanOutBatchJob + + 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 index 000000000..82c7c39b8 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/account-create-bigbird.xml @@ -0,0 +1,12 @@ + + + ${screenName} + ${email} + 1234567890 + ${userId} + + ${password} + + 1 + + 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 index 000000000..834f75752 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/accountroles-post-bigbird.xml @@ -0,0 +1,13 @@ + + + ROLE + + ${createAccount.CSID} + ${screenName} + ${userId} + + + ${createRole.CSID} + ROLE_1_BIRD + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-Template.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-Template.xml index 00cbca7d9..48f278dbd 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-Template.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-Template.xml @@ -1,37 +1,43 @@ - - name0 - notes0 - - CollectionObject - Intake - - - TENANT_READER - TENANT_ADMINISTRATOR - - - - blobs - CRUL - - - media - CRUL - - - concepts - RL - - - collectionobjects - RL - - - false - false - false - false - false - className0 - + + + name0 + notes0 + + CollectionObject + Intake + + + TENANT_READER + TENANT_ADMINISTRATOR + + + + blobs + CRUL + + + media + CRUL + + + concepts + RL + + + collectionobjects + RL + + + false + false + false + false + false + className0 + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-permissions.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-permissions.xml index 1ff6409d2..479ea3d81 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-permissions.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-permissions.xml @@ -1,6 +1,6 @@ - + batch-create-permissions A batch resource for testing the Batch service's permission enforcement before invoking batch jobs. @@ -13,8 +13,8 @@ CRUL - concepts - RL + conceptauthorities + CRL collectionobjects 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 index 000000000..4de48375e --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-create-roles.xml @@ -0,0 +1,13 @@ + + + + batch-create-roles + A batch job record for testing the batch service's authz enforcement or roles before running a batch job. + + TENANT_READER + TENANT_ADMINISTRATOR + + true + org.collectionspace.services.batch.nuxeo.TestBatchJob + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-invoke-nocontext.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-invoke-nocontext.xml index 340e4d989..ffc1f3f18 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-invoke-nocontext.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-invoke-nocontext.xml @@ -3,5 +3,5 @@ Valid modes - {"single", "list", "group", "nocontext"} --> - nocontexty + nocontext diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-update-object-loc.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-update-object-loc.xml index ffdd76cde..9e011213a 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-update-object-loc.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch-update-object-loc.xml @@ -275,7 +275,7 @@ batch/res/collectionobject.res.xml - ${createMovement2.currentLocation} + ${createMovement1.currentLocation} 200 diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch.xml index c7d195cc4..1621f330c 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch.xml @@ -3,71 +3,128 @@ YWRtaW5AY29yZS5jb2xsZWN0aW9uc3BhY2Uub3JnOkFkbWluaXN0cmF0b3I= - cmVhZGVyQGNvcmUuY29sbGVjdGlvbnNwYWNlLm9yZzpyZWFkZXI= - YWRtaW5AY29sbGVjdGlvbnNwYWNlLm9yZzpBZG1pbmlzdHJhdG9y + YmlnYmlyZEBjc3BhY2Uub3JnOkFkbWluaXN0cmF0b3I= - + + + POST + /cspace-services/accounts + batch/account-create-bigbird.xml + + bigbird@cspace.org + bigbird@cspace.org + bigbird@cspace.org + QWRtaW5pc3RyYXRvcg== + + + + POST + /cspace-services/authorization/roles + batch/role-create-bird.xml + + + POST + /cspace-services/authorization/roles/${createRole.CSID}/permroles + batch/permissionroles-post-bird.xml + + + POST + /cspace-services/accounts/${createAccount.CSID}/accountroles + batch/accountroles-post-bigbird.xml + + bigbird@cspace.org + bigbird@cspace.org + + + + + POST /cspace-services/batch/ batch/batch-create-permissions.xml - + POST /cspace-services/batch/${createBatchPermissions.CSID} batch/batch-invoke-nocontext.xml - + + + POST + /cspace-services/batch/${createBatchPermissions.CSID} + batch/batch-invoke-nocontext.xml + 403 + + + + + POST + /cspace-services/batch/ + batch/batch-create-roles.xml + + + POST + /cspace-services/batch/${createBatchRoles.CSID} + batch/batch-invoke-nocontext.xml + + + POST + /cspace-services/batch/${createBatchRoles.CSID} + batch/batch-invoke-nocontext.xml + 403 + - - POST - /cspace-services/batch/ - batch/batch1.xml - - + POST /cspace-services/batch/ - batch/batch2.xml + batch/TestCreateAndLinkLoanOutBatchJob.xml - + POST /cspace-services/collectionobjects/ batch/collObj1.xml POST - /cspace-services/batch/${createBatch1.CSID} - batch/batchInvContextSingle.xml + /cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID} + batch/batch-invoke-single.xml - ${createBatch.CSID} + ${createCollObj1.CSID} POST - /cspace-services/batch/${createBatch1.CSID} - batch/batchInvContextList.xml + /cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID} + batch/batch-invoke-list.xml - ${createBatch.CSID} + ${createCollObj1.CSID} POST 400 - /cspace-services/batch/${createBatch1.CSID} - batch/batchBadInvContext.xml + /cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID} + batch/batch-invoke-gargabe.xml - ${createBatch.CSID} + ${createCollObj1.CSID} POST 400 - /cspace-services/batch/${createBatch1.CSID} - batch/batchBadInvContextList.xml + /cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID} + batch/batch-invoke-list-empty.xml - ${createBatch.CSID} + ${createCollObj1.CSID} @@ -83,11 +140,11 @@ DELETE - /cspace-services/batch/${createBatch1.CSID} + /cspace-services/batch/${TestCreateAndLinkLoanOutBatchJob.CSID} DELETE - /cspace-services/collectionobjects/${createBatch.CSID} + /cspace-services/collectionobjects/${createCollObj1.CSID} --> 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 index 5864169f3..000000000 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (2).xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - TestBatchJob - A benign batch job for testing the Batch service. - - TENANT_READER - TENANT_ADMINISTRATOR - - - - blobs - CRUL - - - media - CRUL - - - concepts - RL - - - collectionobjects - RL - - - false - false - false - false - false - org.collectionspace.services.batch.nuxeo.TestBatchJob - - 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 index 5864169f3..000000000 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (3).xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - TestBatchJob - A benign batch job for testing the Batch service. - - TENANT_READER - TENANT_ADMINISTRATOR - - - - blobs - CRUL - - - media - CRUL - - - concepts - RL - - - collectionobjects - RL - - - false - false - false - false - false - org.collectionspace.services.batch.nuxeo.TestBatchJob - - 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 index 5864169f3..000000000 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (4).xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - TestBatchJob - A benign batch job for testing the Batch service. - - TENANT_READER - TENANT_ADMINISTRATOR - - - - blobs - CRUL - - - media - CRUL - - - concepts - RL - - - collectionobjects - RL - - - false - false - false - false - false - org.collectionspace.services.batch.nuxeo.TestBatchJob - - 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 index 5864169f3..000000000 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/batch1 - Copy (5).xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - TestBatchJob - A benign batch job for testing the Batch service. - - TENANT_READER - TENANT_ADMINISTRATOR - - - - blobs - CRUL - - - media - CRUL - - - concepts - RL - - - collectionobjects - RL - - - false - false - false - false - false - org.collectionspace.services.batch.nuxeo.TestBatchJob - - 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 index 000000000..c5e3482bf --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/permissionroles-post-bird.xml @@ -0,0 +1,15 @@ + + + + 1-objectexit-RL + objectexit + + + 1-batch-CRUDL + batch + + + ${createRole.CSID} + ROLE_1_BIRD + + 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 index 000000000..bd12dd5c4 --- /dev/null +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/batch/role-create-bird.xml @@ -0,0 +1,5 @@ + + + ROLE_1_BIRD + Role for testing batch invoke permissions + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml index 7ed8392e3..796a932c7 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/xml-replay-master.xml @@ -47,7 +47,8 @@ - + + -- 2.47.3