They are uninteresting and make it harder to spot actual errors and
warnings.
- my ( $class, $dsn, $user, $pass ) = @_;
+ my ( $class, $dsn, $user, $pass, $opts ) = @_;
$dsn ||= 'dbi:SQLite:dbname=t/var/dvdzbr.db';
warn "testing $dsn\n";
$dsn ||= 'dbi:SQLite:dbname=t/var/dvdzbr.db';
warn "testing $dsn\n";
- my $schema = $class->connect( $dsn, $user, $pass, {} );
+ my $schema = $class->connect( $dsn, $user, $pass, $opts || {} );
my $deploy_attrs;
$deploy_attrs->{add_drop_table} = 1 if tables_exist( $schema->storage->dbh );
$schema->deploy( $deploy_attrs );
my $deploy_attrs;
$deploy_attrs->{add_drop_table} = 1 if tables_exist( $schema->storage->dbh );
$schema->deploy( $deploy_attrs );
. ' (note: creates and tables!)'
unless ( $dsn && $user );
. ' (note: creates and tables!)'
unless ( $dsn && $user );
-my $schema = DBSchema->get_test_schema( $dsn, $user, $pass );
-
+my $schema = DBSchema->get_test_schema( $dsn, $user, $pass, {
+ on_connect_do => [ 'SET client_min_messages=WARNING' ],
+} );