summaryrefslogtreecommitdiff
path: root/units/miscellanea
diff options
authorKristin Chuang <kristin.chuang@canonical.com>2021-03-03 16:43:32 +0800
committerKristin Chuang <kristin.chuang@canonical.com>2021-03-03 16:43:32 +0800
commit4056cde07f2c2f34583f9a37bbeecb3bce29fde4 (patch)
treea0a9f068cbe940eb8235887687424c9008f252a6 /units/miscellanea
parent3f14a663de76a14554f4cde6735b459d2c96ccca (diff)
add template job for checking connection of plugs
Diffstat (limited to 'units/miscellanea')
-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..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