Integration test can be parameterised to run against any remote database (by default, integration tests use in-memory H2 instances).
For the purpose of testing other relational database providers or different database setups (for example, H2 in server mode),
we introduce an optional system property called ``databaseProvider`` which is resolved at run-time to load a configuration file on the classpath with the
name ``$databaseProvider.conf`` containing database configuration properties that override the default H2 settings
defined in the general node configuration file (see ``reference.conf``).
Integration test runs predefined set of SQL setup scripts selected for a specific database provider by ``test.db.script.dir``.
SQL scripts is a template which contains standard SQL DDL statements with a ${schema} placeholder. An integration test runs the SQL scripts
for all nodes involed in the test and replaces ${schema} with appropriate value derived from node name.
SQL templates files are executed at different stage of an integration test:
``db-global-setup.sql``- before a test class (@BeforeClass), should create database users, schema and permissions
``db-setup.sql`` - before a test (@Before), should clean up/drop tables
``db-cleanup.sql` - after a test (@After), may clean up/drop tables
``db-global-cleanup.sql`` - after a test class (@AfterClass), may drop user and schema
Depends on the database providers not each SQL file is present (e.g. db-setp always deletes tabels so db-cleanp is not needed).