Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Rebuilding the test database

...

(updating src

...

/

...

test

...

/

...

db/init-

...

db.sql

...

):

By default, running the full integration test will reset and rebuild the test database.  However, just after a release, or after a major schema change is made (often when data is removed or moved) it may be necessary to rebuild the script that populates the test database. This can be done with the following process:

  1. drop your local development tdarmetadata database and recreate it from tdarmetadata.zipapply all schema changes in
  2. run src/main/db/upgrade-db.sql (remember to add schema changes to upgrade-db.sql first!)run load_tdarmetadata_database.sh to reinitialize your database with the appropriate test data
  3. run mvn -PsqlExtract initialize compile exec:java
  4. this should rebuild src/test/db/init-test.sql based on src/test/db/extractRecords.sql
  5. refresh the mercurial tree and then commit changes
Note

extractRecords.sql should only need to be modified when there are significant changes to the schema (e.g., consolidating tables or other table-level changes, or adding new test data, new resource ids, etc.)

 

Integration Testing

Tests involving database transactions

...