Project:Perl/maint-notes/dev-perl/DBIx-Safe

From Gentoo Wiki
Jump to:navigation Jump to:search

Tests

Tests for DBIx::Safe require some preconfiguration:

FILE /etc/portage/env/dev-perl/DBIx-Safe
export DBI_DSN="dbi:Pg:dbname=pgtest"
export DBI_USER="pgtest_user"
export DBI_PASS="test"
CODE schema
CREATE ROLE pgtest_user LOGIN PASSWORD 'test' VALID UNTIL 'infinity';
CREATE DATABASE pgtest
  WITH OWNER = pgtest_user
       ENCODING = 'UTF8';
GRANT ALL ON DATABASE pgtest TO pgtest_user;

And of course, require a running postgres instance.