]> git.aero2k.de Git - tmp/jakarta-migration.git/commit
CSPACE-1016 service tests can now be run with auth
authorSanjay Dalal <sanjay.dalal@berkeley.edu>
Tue, 16 Feb 2010 21:24:44 +0000 (21:24 +0000)
committerSanjay Dalal <sanjay.dalal@berkeley.edu>
Tue, 16 Feb 2010 21:24:44 +0000 (21:24 +0000)
commit1695568c757635ee27a8d59255eb6354aacce54d
treed0f4dd75d131f539ee2eb83ecdb9541f0eaa8140
parent2678a44566f290ac2aa0a52db85eabc445e8ea4a
CSPACE-1016 service tests can now be run with auth
test: all service tests (except id) with and without auth. id service tests fail locally due to a classpath issue (not able to find jdbc driver)

If the auth mode is disabled, you would see the following emitted from AbstractServiceClientImpl during construction

INFO main org.collectionspace.services.client.AbstractServiceClientImpl:191 setupHttpClient() : no auth mode!

Required system properties to run the tests with authentication enabled are

1. cspace.auth to true, indicates to use HTTP authentication. We will use BASIC authentication in these tests.
2. cspace.user indicates user name to use
3. cspace.password indicates password to use (clear text ... this is only a test)
4. cspace.server.secure true, indicates that services layer is enabled for security. Some tests still use this property. This was added because web.xml changes were required to enable security on the server side. With Spring security, it is no more needed on the server side. However, some client side tests (account, security, collecitonobject, relation) would still look for it.

command line would be

mvn -Dcspace.server.secure=true -DforkMode=never -Dcspace.auth=true -Dcspace.user=test -Dcspace.password=test test

Note that forkMode=never is required to pass properties to the JVM. Without that property, maven may start a new process to run the test and would not pass the required properties.

_M   trunk/services/PerformanceTests
M    trunk/services/dimension/client/src/main/java/org/collectionspace/services/client/DimensionClient.java
M    trunk/services/acquisition/client/src/main/java/org/collectionspace/services/client/AcquisitionClient.java
M    trunk/services/contact/client/src/main/java/org/collectionspace/services/client/ContactClient.java
_M   trunk/services/account/pstore
M    trunk/services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClient.java
M    trunk/services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClient.java
M    trunk/services/intake/client/src/main/java/org/collectionspace/services/client/IntakeClient.java
M    trunk/services/client/src/test/java/org/collectionspace/services/client/test/ServiceLayerTest.java
M    trunk/services/client/src/main/java/org/collectionspace/services/client/AbstractServiceClientImpl.java
services/acquisition/client/src/main/java/org/collectionspace/services/client/AcquisitionClient.java
services/client/src/main/java/org/collectionspace/services/client/AbstractServiceClientImpl.java
services/client/src/test/java/org/collectionspace/services/client/test/ServiceLayerTest.java
services/contact/client/src/main/java/org/collectionspace/services/client/ContactClient.java
services/dimension/client/src/main/java/org/collectionspace/services/client/DimensionClient.java
services/intake/client/src/main/java/org/collectionspace/services/client/IntakeClient.java
services/organization/client/src/main/java/org/collectionspace/services/client/OrgAuthorityClient.java
services/person/client/src/main/java/org/collectionspace/services/client/PersonAuthorityClient.java