summaryrefslogtreecommitdiff
diff options
authorPMR <pmr@pmr-lander>2021-03-03 10:45:01 +0000
committerPMR <pmr@pmr-lander>2021-03-03 10:45:01 +0000
commit6a219625f52503c345dc5de544321df7785a3ad9 (patch)
treea2191bcde99d596382a28d4980c3aca66860e902
parent3f14a663de76a14554f4cde6735b459d2c96ccca (diff)
parentc9794434d24015c7da3090ebd557da2f76aeb172 (diff)
Merge #397211 from ~hyac109/plainbox-provider-checkbox:generic-interface-plug-test
add template job for checking connection of plugs
-rw-r--r--units/miscellanea/snap-auto-connection.pxu15
1 files changed, 15 insertions, 0 deletions
diff --git a/units/miscellanea/snap-auto-connection.pxu b/units/miscellanea/snap-auto-connection.pxu
new file mode 100644
index 0000000..1dee3f3
--- /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 {{ name }} plug is connected
+plugin: shell
+command:
+ plug_connected_test.py {{ snap }} {{ name }}
+category_id: com.canonical.plainbox::miscellanea
+estimated_duration: 1.0