Merge ~kzapalowicz/snappy-hwe-snaps/+git/engineering-tests:feature/udisks2-add-debug-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Konrad Zapałowicz
Status: Merged
Approved by: Simon Fels
Approved revision: 9c83a173d676d3a3c99c030ea268c6f32a50218d
Merged at revision: b8a4cad2381682c9563a6e61a500ef0ac9d307b0
Proposed branch: ~kzapalowicz/snappy-hwe-snaps/+git/engineering-tests:feature/udisks2-add-debug-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 72 lines (+50/-7)
1 file modified
udisks2/units/udisks2.pxu (+50/-7)
Reviewer Review Type Date Requested Status
Simon Fels Approve
System Enablement Bot continuous-integration Approve
Review via email: mp+324848@code.launchpad.net

Description of the change

udisks2: add tests for debug config option

This commit adds tests for debug config option as well as it
removes a note related to https://bugs.launchpad.net/snapd/+bug/1636934
which is not valid anymore.

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/udisks2/units/udisks2.pxu b/udisks2/units/udisks2.pxu
index 7c944b8..7006baf 100644
--- a/udisks2/units/udisks2.pxu
+++ b/udisks2/units/udisks2.pxu
@@ -131,13 +131,6 @@ _steps:
131 $ sudo snap get udisks2 automount.enable131 $ sudo snap get udisks2 automount.enable
132_verification:132_verification:
133 Verify that the returned value is "false"133 Verify that the returned value is "false"
134 .
135 Note that there is a known bug in snapd which preserves the state of the
136 config options between snap remove and snap install. Therefore, if you have
137 ever set the automount option to 'true' before, then it will not be 'false'
138 even if you install the snap fresh. You need to use a fresh image for
139 testing.
140 bug url: https://bugs.launchpad.net/snapd/+bug/1636934
141134
142id: udisks2/automount/disabling_works135id: udisks2/automount/disabling_works
143category_id: udisks2136category_id: udisks2
@@ -273,3 +266,53 @@ _steps:
273_verification:266_verification:
274 Verify that the USB drive that has been plugged in after the first one has267 Verify that the USB drive that has been plugged in after the first one has
275 been unmounted manually is mounted.268 been unmounted manually is mounted.
269
270id: udisks2/debug/default_off
271category_id: udisks2
272plugin: manual
273depends: udisks2/setup/ensure_interface_connection_setup
274_summary: The debug option defaults to off
275_purpose:
276 Makes sure that the debug option defaults to disabled
277_steps:
278 1. Install the udisks2 snap fresh (i.e. not an upgrade)
279 2. Run the following:
280 .
281 $ sudo snap get udisks2 debug.enable
282_verification:
283 Verify that the returned value is "false"
284
285id: udisks2/debug/disabling_works
286category_id: udisks2
287plugin: manual
288depends: udisks2/debug/default_off
289_summary: Disabling debug actually disables debug logging
290_purpose:
291 Makes sure that when debug.enabled is set to "false" no loggs are written
292_steps:
293 1. Make sure that debug is disabled. Run:
294 .
295 $ sudo snap set udisks2 debug.enable=false
296 2. Plug in a USB storage device
297_verification:
298 Verify that no debug information coming from files such as jobs.go,
299 dispatcher.go, udisks2.go is written to the journal.
300
301id: udisks2/automount/debug_works
302category_id: udisks2
303plugin: manual
304depends: udisks2/debug/default_off
305_summary: When debug is enabled logs are available
306_purpose:
307 Makes sure that when debug option is enabled the logs are available
308_steps:
309 1. Make sure that debug is enabled. Run:
310 .
311 $ sudo snap set udisks2 debug.enable=true
312 2. Restart ciborium service for the above change to take effect
313 .
314 $ sudo systemctl restart snap.udisks2.ciborium.service
315 3. Plug in a USB storage drive
316_verification:
317 Verify that debug information coming from udisks2 snap (files such as
318 jobs.go, dispatcher.go, udisks2.go) is written to the journal.

Subscribers

People subscribed via source and target branches