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
1diff --git a/udisks2/units/udisks2.pxu b/udisks2/units/udisks2.pxu
2index 7c944b8..7006baf 100644
3--- a/udisks2/units/udisks2.pxu
4+++ b/udisks2/units/udisks2.pxu
5@@ -131,13 +131,6 @@ _steps:
6 $ sudo snap get udisks2 automount.enable
7 _verification:
8 Verify that the returned value is "false"
9- .
10- Note that there is a known bug in snapd which preserves the state of the
11- config options between snap remove and snap install. Therefore, if you have
12- ever set the automount option to 'true' before, then it will not be 'false'
13- even if you install the snap fresh. You need to use a fresh image for
14- testing.
15- bug url: https://bugs.launchpad.net/snapd/+bug/1636934
16
17 id: udisks2/automount/disabling_works
18 category_id: udisks2
19@@ -273,3 +266,53 @@ _steps:
20 _verification:
21 Verify that the USB drive that has been plugged in after the first one has
22 been unmounted manually is mounted.
23+
24+id: udisks2/debug/default_off
25+category_id: udisks2
26+plugin: manual
27+depends: udisks2/setup/ensure_interface_connection_setup
28+_summary: The debug option defaults to off
29+_purpose:
30+ Makes sure that the debug option defaults to disabled
31+_steps:
32+ 1. Install the udisks2 snap fresh (i.e. not an upgrade)
33+ 2. Run the following:
34+ .
35+ $ sudo snap get udisks2 debug.enable
36+_verification:
37+ Verify that the returned value is "false"
38+
39+id: udisks2/debug/disabling_works
40+category_id: udisks2
41+plugin: manual
42+depends: udisks2/debug/default_off
43+_summary: Disabling debug actually disables debug logging
44+_purpose:
45+ Makes sure that when debug.enabled is set to "false" no loggs are written
46+_steps:
47+ 1. Make sure that debug is disabled. Run:
48+ .
49+ $ sudo snap set udisks2 debug.enable=false
50+ 2. Plug in a USB storage device
51+_verification:
52+ Verify that no debug information coming from files such as jobs.go,
53+ dispatcher.go, udisks2.go is written to the journal.
54+
55+id: udisks2/automount/debug_works
56+category_id: udisks2
57+plugin: manual
58+depends: udisks2/debug/default_off
59+_summary: When debug is enabled logs are available
60+_purpose:
61+ Makes sure that when debug option is enabled the logs are available
62+_steps:
63+ 1. Make sure that debug is enabled. Run:
64+ .
65+ $ sudo snap set udisks2 debug.enable=true
66+ 2. Restart ciborium service for the above change to take effect
67+ .
68+ $ sudo systemctl restart snap.udisks2.ciborium.service
69+ 3. Plug in a USB storage drive
70+_verification:
71+ Verify that debug information coming from udisks2 snap (files such as
72+ jobs.go, dispatcher.go, udisks2.go) is written to the journal.

Subscribers

People subscribed via source and target branches