allow test to run without a db
This commit is contained in:
@@ -7,6 +7,7 @@ use Test::File::ShareDir::Dist { 'App-Netdisco' => 'share/' };
|
|||||||
use lib 'xt/lib';
|
use lib 'xt/lib';
|
||||||
|
|
||||||
use App::Netdisco;
|
use App::Netdisco;
|
||||||
|
use App::Netdisco::DB; # fake device row
|
||||||
use App::Netdisco::Backend::Job;
|
use App::Netdisco::Backend::Job;
|
||||||
|
|
||||||
use Try::Tiny;
|
use Try::Tiny;
|
||||||
@@ -101,7 +102,7 @@ sub do_job {
|
|||||||
|
|
||||||
my $job = App::Netdisco::Backend::Job->new({
|
my $job = App::Netdisco::Backend::Job->new({
|
||||||
job => 0,
|
job => 0,
|
||||||
device => '192.0.2.1',
|
device => App::Netdisco::DB->resultset('Device')->new_result({ip => '192.0.2.1'}),
|
||||||
action => lc($pkg),
|
action => lc($pkg),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user