You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

By default, Fedora's Maven build runs against the embedded H2 database. However, the build can be configured to also run against other databases to help ensure continued compatibility with the databases that Fedora 6.0 supports:

  • PostgreSQL
  • MariaDB
  • MySQL

Note: The cross-database testing documented below is also included in Fedora's Travis-CI configuration.

Running integration tests against different DBs

Running against PostgreSQL

  1. Start your postgres database. One way of doing this is via Docker (see postgres instructions).
  2. Run the Fedora build (assuming db username and password from Docker setup above)
    1. DB=postgresql
      DB_PORT=5432
      mvn -Dfcrepo.db.url="jdbc:${DB}://localhost:${DB_PORT}/fcrepo" -Dfcrepo.db.user="fcrepo-user" -Dfcrepo.db.password="fcrepo-pw" clean install -P db-test 

Running against MariaDB

  1. Start your postgres database. One way of doing this is via Docker (see mariadb instructions).
  2. Run the Fedora build (assuming db username and password from Docker setup above)
    1. DB=mariadb
      DB_PORT=3306
      mvn -Dfcrepo.db.url="jdbc:${DB}://localhost:${DB_PORT}/fcrepo" -Dfcrepo.db.user="fcrepo-user" -Dfcrepo.db.password="fcrepo-pw" clean install -P db-test 

Running against MySQL

  1. Start your postgres database. One way of doing this is via Docker (see postgres instructions).
  2. Run the Fedora build (assuming db username and password from Docker setup above)
    1. DB=mysql
      DB_PORT=3306
      mvn -Dfcrepo.db.url="jdbc:${DB}://localhost:${DB_PORT}/fcrepo" -Dfcrepo.db.user="fcrepo-user" -Dfcrepo.db.password="fcrepo-pw" clean install -P db-test 
  • No labels