some reengineering to support proper testing

This commit is contained in:
Oliver Gorwits
2017-11-12 00:14:21 +00:00
parent c5f138fe62
commit 2de36c69ba
8 changed files with 110 additions and 73 deletions

View File

@@ -0,0 +1,17 @@
package App::NetdiscoX::Worker::Plugin::TestOne;
use Dancer ':syntax';
use App::Netdisco::Worker::Plugin;
use aliased 'App::Netdisco::Worker::Status';
# info 'test: workers are run in decreasing priority until done';
register_worker({ phase => 'main', driver => 'cli' }, sub {
return Status->noop('NOT OK: CLI driver is not the winner here.');
});
register_worker({ phase => 'main', driver => 'snmp' }, sub {
return Status->done('OK: SNMP driver is successful.');
});
true;