Configuring machines for Shaolinq unit testing

Thong Nguyen edited this page Jan 16, 2014 · 2 revisions

Postgres configuration

Postgres needs to be installed with the default settings. Admin username and password should be postgres/postgres.

Postgres Linux notes

Set the default password by issuing the following commands:

sudo -u postgres psql postgres

# \password postgres

Enter new password: postgres

Some distributions default to ident login auth. If you're not running unit tests as the postgres user make sure you change the auth method to password by editing your /var/lib/pgsql/9.3/data/pg_hba.conf file as follows:

host    all             all             127.0.0.1/32            password

MySql configuration

MySql needs to be installed with default settings. Admin username and password should be root/ root.

MySql Linux Notes

Some default Linux installations don't use InnoDB as the default engine and don't have strict mode enabled. In order for all the unit tests to pass, InnoDB and strict mode is required. Edit /etc/my.cnf and make sure that you include the following directives:

[mysqld]
ignore_builtin_innodb
plugin-load=innodb=ha_innodb_plugin.so;innodb_trx=ha_innodb_plugin.so;innodb_locks=ha_innodb_plug
symbolic-links=0
default-storage-engine = innodb
innodb_strict_mode = on
sql_mode=STRICT_TRANS_TABLES,STRICT_ALL_TABLES

Sqlite

The Sqlite tests test Sqlite URIs which are only supported in Sqlite 3.7.7 and later. If your distro doesn't only supports an older version (CentOS for example), then download the autoconf source from here, compile it, and then make sure that libsqlite3.so.0 first in the search path (over the OS provided lib) by placing your custom built libsqlite.so.0 in the "current directory" you use to run NUnit from.