puppetlabs/puppetdb — pull request #266 by cprice-puppet (2012-08-24 23:14:36+00:00)
Title: Feature/master/test db config file

commit 558a7caf536dc089cb0b9527e19ab835db79b123
Author: Chris Price
Date: Fri Aug 24 16:05:00 2012 -0700

Add support for a test configuration file

This commit adds support for a configuration file to be used
during unit test runs. At present, the only thing that you
can define in the config file is a function that returns
a map of database settings. There is a default configuration
file provided, which simply returns the same database settings
that we were using before (an in-memory hsql database with
a random UUID). However, it also provides instruction for
creating a local override of the default config file, including
an example of how to configure your tests to run against
postgres instead of hsql.

This commit also tweaks the with-test-db fixture to call
a database-cleanup function prior to running the database
migration. This cleanup function drops all of the tables
if they exist, so that each test can start with a fresh db.

commit 229de6a522fc7bdaeed701fd6e9e899f95817fc0
Author: Chris Price
Date: Fri Aug 24 16:09:32 2012 -0700

Autoformat test/scf/storage.clj for indentation fixes

The previous commit changed a lot of the nesting of the
code in this file because it introduced several new
"deftest" calls, in order to work properly with the
with-test-db fixture. This commit simply attempts to
clean up the whitespace / indentation of the file.