Skip to content

Commit

Permalink
add xt/postgresql.t
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Nov 25, 2010
1 parent d7458dd commit 622481b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
28 changes: 28 additions & 0 deletions xt/Utils/postgresql.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package xt::Utils::postgresql;

use strict;
use warnings;
use Test::postgresql;
use Test::More;
use t::Utils;

my $pgsql = Test::postgresql->new
or plan skip_all => $Test::postgresql::errstr;

{
no warnings "redefine";
sub t::Utils::setup {
my $dbh = DBI->connect($pgsql->dsn);
$dbh->do(q{
CREATE TABLE job (
id SERIAL PRIMARY KEY ,
func TEXT NOT NULL,
arg BYTEA,
enqueue_time TIMESTAMP NOT NULL
)
});
$dbh;
}
}

1;
8 changes: 8 additions & 0 deletions xt/postgresql.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use strict;
use warnings;
use xt::Utils::postgresql;
use Test::More;

subtest 'client' => sub { do "t/client.t" };
subtest 'worker' => sub { do "t/worker.t" };
done_testing;

0 comments on commit 622481b

Please sign in to comment.