add tests

This commit is contained in:
Oliver Gorwits
2017-11-12 20:38:35 +00:00
parent 2de36c69ba
commit 840b6b4069
6 changed files with 113 additions and 7 deletions

View File

@@ -28,6 +28,9 @@ sub run {
$job->device( get_device($job->device) );
Module::Load::load 'App::Netdisco::Worker' => $job->action;
# finalise job status when we exit
my $statusguard = guard { $job->finalise_status };
my @newuserconf = ();
my @userconf = @{ setting('device_auth') || [] };
@@ -52,9 +55,6 @@ sub run {
my $configguard = guard { set(device_auth => \@userconf) };
set(device_auth => \@newuserconf);
# finalise job status when we exit
my $statusguard = guard { $job->finalise_status };
# run check phase and if there are workers then one MUST be successful
$self->run_workers('nd2_core_check');
return if not $job->check_passed;