From 4056cde07f2c2f34583f9a37bbeecb3bce29fde4 Mon Sep 17 00:00:00 2001 From: Kristin Chuang Date: Wed, 3 Mar 2021 16:43:32 +0800 Subject: add template job for checking connection of plugs --- units/miscellanea/snap-auto-connection.pxu | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 units/miscellanea/snap-auto-connection.pxu diff --git a/units/miscellanea/snap-auto-connection.pxu b/units/miscellanea/snap-auto-connection.pxu new file mode 100644 index 0000000..de5e361 --- /dev/null +++ b/units/miscellanea/snap-auto-connection.pxu @@ -0,0 +1,15 @@ +# This template job can be used to check any required snap interface connections. +# For example, if you wish to check that the "home" +# plug of the "multipass" snap is connected to a corresponding slot, +# simply run the job com.canonical.certification::miscellanea/check-plug_multipass_home +unit: template +template-engine: jinja2 +template-resource: interface +template-filter: interface.type == 'plug' +id: miscellanea/check-plug_{{ snap }}_{{ name }} +_summary: Ensure the snap {{ snap }}'s plug {{ name }} is connected +plugin: shell +command: + plug_connected_test.py {{ snap }} {{ name }} +category_id: com.canonical.plainbox::miscellanea +estimated_duration: 1.0 -- cgit v1.2.3 From c9794434d24015c7da3090ebd557da2f76aeb172 Mon Sep 17 00:00:00 2001 From: Kristin Chuang Date: Wed, 3 Mar 2021 18:17:49 +0800 Subject: rephrase miscellanea/check-plug_{{ snap }}_{{ name }} job summary --- units/miscellanea/snap-auto-connection.pxu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/units/miscellanea/snap-auto-connection.pxu b/units/miscellanea/snap-auto-connection.pxu index de5e361..1dee3f3 100644 --- a/units/miscellanea/snap-auto-connection.pxu +++ b/units/miscellanea/snap-auto-connection.pxu @@ -7,7 +7,7 @@ template-engine: jinja2 template-resource: interface template-filter: interface.type == 'plug' id: miscellanea/check-plug_{{ snap }}_{{ name }} -_summary: Ensure the snap {{ snap }}'s plug {{ name }} is connected +_summary: Ensure the {{ snap }} snap's {{ name }} plug is connected plugin: shell command: plug_connected_test.py {{ snap }} {{ name }} -- cgit v1.2.3