CruGlobal/conf-registration-api — pull request #166 by ryancarlson (2014-06-05 16:01:36+00:00)
Title: Database & Testing update

In this PR are some structural changes to tests:
- No database URLs or credentials are stored in the project (source code, config or otherwise)
- All Database info & creds are retrieved via `CrsProperties`
- All tests which interact with the database extend `AbstractServiceTest`
- `AbstractServiceTest` does a refresh of the target database before each test run

Necessary changes:
- Add profiles which contain DB URL, user & password to maven settings.xml (usually found at ~/.m2/settings.xml). See below for example.

Known side effects:
- Tests can no longer be run inside intelliJ as even when running a maven goal inside the IDE, the properties don't get set in src/test/resources/default-properties.xml
- When running tests from CL, a profile must be specified. See example:

Example profile:
```xml

eventhub-local

jdbc:postgresql://localhost/crsdb
crsuser
[password]

eventhub-unittest

jdbc:postgresql://[remote-ip/host]/crs_unittest
crs_unittest_user
[password]

```
Example test run:
```
bash: mvn clean test -Dgroups=[functional-tests,dbtest,unittest] -P [eventhub-unittest]
```