How to test unit template jobs?

Pierre Equoy pierre.equoy at canonical.com
Mon Dec 28 02:59:04 UTC 2015


Hi,

I'm trying to migrate local jobs (e.g. from the checkbox provider [1]) to
unit template jobs [2].

For instance, I replaced the *hdparm* local job [3] with:

unit: template
template-unit: job
template-resource: device
template-filter: device.category == 'DISK'
plugin: attachment
category_id: 2013.com.canonical.plainbox::info
id: info/hdparm_{name}.txt
estimated_duration: 1.0
requires:
 package.name == 'hdparm'
 device.path == '{path}'
 block_device.{name}_state != 'removable'
user: root
command: hdparm -I /dev/{name}

My problem is I cannot find this job afterwards! When I try to run plainbox
to run this job, it tells me there are no job with the given pattern:

    plainbox run -i "^.*info/hdparm.*$"

(however, this command runs fine with current local job version of hdparm)

What am I doing wrong? How to test unit template jobs?

Thanks!

[1] https://launchpad.net/plainbox-provider-checkbox/
[2]
http://plainbox.readthedocs.org/en/latest/manpages/plainbox-template-units.html#migrating-from-local-jobs
[3]
http://bazaar.launchpad.net/~checkbox-dev/checkbox/trunk/view/head:/providers/plainbox-provider-checkbox/jobs/info.txt.in#L212

-- 
Pierre Equoy
QA & Certification Engineer | Canonical
www.canonical.com | www.ubuntu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/checkbox-devel/attachments/20151228/0db0cd64/attachment.html>


More information about the Checkbox-devel mailing list