From: Sanjay Dalal Date: Wed, 19 May 2010 20:57:19 +0000 (+0000) Subject: NOJIRA moved ServiceLayerTests to new module common-test that is built after authoriz... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=6185415a4970329eb9b682efd02b27257e0dc40d;p=tmp%2Fjakarta-migration.git NOJIRA moved ServiceLayerTests to new module common-test that is built after authorization-mgt module so permissions could be inserted in db before running the service layer tests test: all service tests --- diff --git a/services/authorization-mgt/import/src/main/resources/import-data/import-permissions-roles.xml b/services/authorization-mgt/import/src/main/resources/import-data/import-permissions-roles.xml index 8aa8b869e..f90ba976b 100644 --- a/services/authorization-mgt/import/src/main/resources/import-data/import-permissions-roles.xml +++ b/services/authorization-mgt/import/src/main/resources/import-data/import-permissions-roles.xml @@ -3,7 +3,7 @@ ROLE - 05afcbb5-42f2-4d93-a2c8-aaaed450c306 + a4017e3d-1eef-42b1-bdb7-8443d681707c collectionobjects @@ -14,7 +14,7 @@ ROLE - 4891efb7-91c8-45f8-920e-ffc86e17b3da + 66d54998-a1a1-4c64-9728-2b6d8b9b61df intakes @@ -25,7 +25,7 @@ ROLE - 20e8c44d-103c-4b1d-bee0-80e13c02d472 + 07e47d8a-1aa6-440b-b30b-a2d42d8023a1 loansin @@ -36,7 +36,7 @@ ROLE - 544cfaee-455f-4daa-a037-c4b0907bbf20 + 476a773b-83ad-4383-8761-c92930bf527c loansout @@ -47,7 +47,7 @@ ROLE - f16f4cd8-62ba-4a43-932f-38521f0fa18d + b0144782-e289-4847-bb67-e9b5c0412887 movements @@ -58,7 +58,7 @@ ROLE - a20baf6b-d476-4106-a836-1b600bf669f8 + 8cc25692-4d52-40e2-afbc-b95a79db3b0a vocabularies @@ -69,7 +69,7 @@ ROLE - 779a0b7e-27eb-4621-8920-588c296e12ee + d2f87bd9-9ea6-4b39-aebe-6a0fc6d96594 vocabularyitems @@ -80,7 +80,7 @@ ROLE - 2d873988-7339-42ad-b432-ebb77df34910 + 80e32ee8-4740-4b48-a3ba-aec706172146 orgauthorities @@ -91,7 +91,7 @@ ROLE - d0623091-4e67-45ae-8aff-8e91d51cf49a + 49167e68-8001-45b4-abef-c042032e488e organizations @@ -102,7 +102,7 @@ ROLE - 3d4824f9-1f98-436d-a7bb-3a24e972e8e4 + 3c69a90d-35b9-4bc0-9360-46977368f86f personauthorities @@ -113,7 +113,7 @@ ROLE - d5119e61-b858-413c-a756-8effa0b390b4 + 3cd1d1b5-1d7b-4795-9e74-26511325720f persons @@ -124,7 +124,7 @@ ROLE - 467a5287-f758-4300-9cb4-ed3a1ad36aee + 0ec19a72-a210-44b9-a10e-817fea57276f acquisitions @@ -135,7 +135,7 @@ ROLE - 0745fb96-cf8d-4cfa-93ed-9b3d078e206e + 808c7f90-16a1-42a6-a24b-06327728b2e4 relations @@ -146,7 +146,7 @@ ROLE - cc931e6c-dde9-41fa-be84-ae14329f6845 + 5840f553-3fa1-4254-8442-7f4e76dfbd08 accounts @@ -157,7 +157,7 @@ ROLE - abfdb597-6432-42d8-9b82-93d520c5275a + fc89633a-56c6-4d20-9022-dbf7919afe0c dimensions @@ -168,7 +168,7 @@ ROLE - 766015d1-5fff-4bc7-ba1c-1d17b71a47fe + f0806b7f-5dca-4aed-bae9-b25fba378f95 contacts @@ -179,7 +179,7 @@ ROLE - f3269b91-2a01-4ddc-9f50-b29ddd1775ee + 173a185c-b2d6-4fae-8c33-89b2e34dbeea authorization/roles @@ -190,7 +190,7 @@ ROLE - a00b8aa8-8965-4d8f-811f-51962310336a + d82cdea5-6643-4aac-a94b-5b5808a6d0e8 authorization/permissions @@ -201,7 +201,7 @@ ROLE - 983be9bf-f016-4673-8ada-ace546dd3254 + 9955709b-267a-4da1-a569-76a2520af6e7 authorization/permroles @@ -212,7 +212,7 @@ ROLE - 1e73718d-c646-485a-a017-eb17eeb3aba2 + 8c816fa9-d1df-4c8c-95a0-7972d214ae09 accounts/accountroles diff --git a/services/authorization-mgt/import/src/main/resources/import-data/import-permissions.xml b/services/authorization-mgt/import/src/main/resources/import-data/import-permissions.xml index aa58510eb..22fb69b4c 100644 --- a/services/authorization-mgt/import/src/main/resources/import-data/import-permissions.xml +++ b/services/authorization-mgt/import/src/main/resources/import-data/import-permissions.xml @@ -1,6 +1,6 @@ - + collectionobjects CREATE @@ -20,7 +20,7 @@ PERMIT 1 - + intakes CREATE @@ -40,7 +40,7 @@ PERMIT 1 - + loansin CREATE @@ -60,7 +60,7 @@ PERMIT 1 - + loansout CREATE @@ -80,7 +80,7 @@ PERMIT 1 - + movements CREATE @@ -100,7 +100,7 @@ PERMIT 1 - + vocabularies CREATE @@ -120,7 +120,7 @@ PERMIT 1 - + vocabularyitems CREATE @@ -140,7 +140,7 @@ PERMIT 1 - + orgauthorities CREATE @@ -160,7 +160,7 @@ PERMIT 1 - + organizations CREATE @@ -180,7 +180,7 @@ PERMIT 1 - + personauthorities CREATE @@ -200,7 +200,7 @@ PERMIT 1 - + persons CREATE @@ -220,7 +220,7 @@ PERMIT 1 - + acquisitions CREATE @@ -240,7 +240,7 @@ PERMIT 1 - + relations CREATE @@ -260,7 +260,7 @@ PERMIT 1 - + accounts CREATE @@ -280,7 +280,7 @@ PERMIT 1 - + dimensions CREATE @@ -300,7 +300,7 @@ PERMIT 1 - + contacts CREATE @@ -320,7 +320,7 @@ PERMIT 1 - + authorization/roles CREATE @@ -340,7 +340,7 @@ PERMIT 1 - + authorization/permissions CREATE @@ -360,7 +360,7 @@ PERMIT 1 - + authorization/permroles CREATE @@ -380,7 +380,7 @@ PERMIT 1 - + accounts/accountroles CREATE diff --git a/services/common-test/pom.xml b/services/common-test/pom.xml new file mode 100644 index 000000000..12e4cf364 --- /dev/null +++ b/services/common-test/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + + org.collectionspace.services.main + org.collectionspace.services + 0.7-SNAPSHOT + + org.collectionspace.services + org.collectionspace.services.common-test + 0.7-SNAPSHOT + services.common-test + http://maven.apache.org + jar + + + + org.slf4j + slf4j-api + provided + + + org.slf4j + slf4j-log4j12 + provided + + + + org.collectionspace.services + org.collectionspace.services.jaxb + ${project.version} + + + org.collectionspace.services + org.collectionspace.services.client + ${project.version} + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.4.3 + + + commons-io + commons-io + + + org.jboss.resteasy + resteasy-jaxrs + + + tjws + webserver + + + + + org.jboss.resteasy + jaxrs-api + + + org.jboss.resteasy + resteasy-jaxb-provider + + + org.jboss.resteasy + resteasy-multipart-provider + + + + + org.testng + testng + 5.6 + + + + + + collectionspace-services-common-test + + diff --git a/services/client/src/test/java/org/collectionspace/services/client/test/ServiceLayerTest.java b/services/common-test/src/test/java/org/collectionspace/services/client/test/ServiceLayerTest.java similarity index 100% rename from services/client/src/test/java/org/collectionspace/services/client/test/ServiceLayerTest.java rename to services/common-test/src/test/java/org/collectionspace/services/client/test/ServiceLayerTest.java diff --git a/services/common-test/src/test/resources/log4j.properties b/services/common-test/src/test/resources/log4j.properties new file mode 100644 index 000000000..18c510350 --- /dev/null +++ b/services/common-test/src/test/resources/log4j.properties @@ -0,0 +1,23 @@ +log4j.rootLogger=debug, stdout, R + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout + +# Pattern to output the caller's file name and line number. +log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +log4j.appender.R=org.apache.log4j.RollingFileAppender +log4j.appender.R.File=target/test-client.log + +log4j.appender.R.MaxFileSize=100KB +# Keep one backup file +log4j.appender.R.MaxBackupIndex=1 + +log4j.appender.R.layout=org.apache.log4j.PatternLayout +log4j.appender.R.layout.ConversionPattern=%d %-5p [%t] [%c:%L] %m%n + +#packages +log4j.logger.org.collectionspace=DEBUG +log4j.logger.org.apache=INFO +log4j.logger.httpclient=INFO +log4j.logger.org.jboss.resteasy=INFO diff --git a/services/pom.xml b/services/pom.xml index 86f43b02b..70f7a8a51 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -19,6 +19,7 @@ jaxb common authorization-mgt + common-test account relation @@ -40,7 +41,7 @@ PerformanceTests security - + org.testng @@ -73,7 +74,7 @@ - + org.codehaus.mojo jboss-maven-plugin @@ -142,7 +143,7 @@ - + org.apache.maven.plugins @@ -154,10 +155,10 @@ org.apache.maven.plugins maven-surefire-plugin - - + + - + @@ -248,7 +249,7 @@ org.jboss.resteasy resteasy-multipart-provider 1.2.GA - + commons-httpclient commons-httpclient @@ -302,4 +303,4 @@ - + \ No newline at end of file