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