Skip to content

Commit bf8c988

Browse files
committed
set username and password for test models for oracle
1 parent c76bd1a commit bf8c988

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

t/lib/sql/Blog.pm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ use base 'Data::ObjectDriver::BaseObject';
77
use Data::ObjectDriver::Driver::DBI;
88
use DodTestUtil;
99

10+
my $username = DodTestUtil::env('DOD_TEST_USER', 'blog');
11+
my $password = DodTestUtil::env('DOD_TEST_PASS', 'blog');
12+
1013
__PACKAGE__->install_properties({
1114
columns => ['id', 'parent_id', 'name'],
1215
datasource => 'blog',
1316
primary_key => 'id',
14-
driver => Data::ObjectDriver::Driver::DBI->new(dsn => DodTestUtil::dsn('global')),
17+
driver => Data::ObjectDriver::Driver::DBI->new(
18+
dsn => DodTestUtil::dsn('global'),
19+
$username ? (username => $username) : (),
20+
$password ? (password => $password) : (),
21+
),
1522
});
1623

1724
1;

t/lib/sql/Entry.pm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@ use base 'Data::ObjectDriver::BaseObject';
77
use Data::ObjectDriver::Driver::DBI;
88
use DodTestUtil;
99

10+
my $username = DodTestUtil::env('DOD_TEST_USER', 'entry');
11+
my $password = DodTestUtil::env('DOD_TEST_PASS', 'entry');
12+
1013
__PACKAGE__->install_properties({
1114
columns => ['id', 'blog_id', 'title', 'text'],
1215
datasource => 'entry',
1316
primary_key => 'id',
14-
driver => Data::ObjectDriver::Driver::DBI->new(dsn => DodTestUtil::dsn('global')),
17+
driver => Data::ObjectDriver::Driver::DBI->new(
18+
dsn => DodTestUtil::dsn('global'),
19+
$username ? (username => $username) : (),
20+
$password ? (password => $password) : (),
21+
),
1522
});
1623

1724
1;

0 commit comments

Comments
 (0)