summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-01-25 18:24:11 +0000
committerintrigeri <intrigeri@boum.org>2019-01-25 18:29:02 +0000
commit682ea4607780b41a8b94ada84d9b709e2d746b6f (patch)
treed4820430df2390398d3c85b8bede9247a425a8d3
parent73c166cce723781dd8067cf7601f96032d6a7f84 (diff)
Test suite: actually disable tails-additional-software-install.service (refs: #14596)
The system-wide tails-additional-software-install.service is not "enabled" in Tails: instead it's started by the corresponding user unit (/usr/lib/systemd/user/tails-additional-software-install.service). So the previous call to "systemctl disable" was a no-op. Let's instead disable the user service. And then there's nothing left for us to (re-)enable: we can as well just start the system-wide service ourselves.
-rw-r--r--features/additional_software_packages.feature4
-rw-r--r--features/step_definitions/additional_software_packages.rb12
2 files changed, 10 insertions, 6 deletions
diff --git a/features/additional_software_packages.feature b/features/additional_software_packages.feature
index 9536b2d..d7664ae 100644
--- a/features/additional_software_packages.feature
+++ b/features/additional_software_packages.feature
@@ -108,11 +108,11 @@ Feature: Additional software
And I enable persistence
# Trying to catch the notification at desktop startup is racy, so let's
# start the installation service only once the desktop has settled.
- And I disable the Additional Software installation service
+ And I disable the user session's Additional Software installation service
And I log in to a new session
And all notifications have disappeared
And I remove the "cowsay" deb files from the APT cache
- And I start the Additional Software installation service
+ And I start the system-wide Additional Software installation service
Then I see the "The installation of your additional software failed" notification after at most 300 seconds
And I can open the Additional Software log file from the notification
And the package "cowsay" is not installed
diff --git a/features/step_definitions/additional_software_packages.rb b/features/step_definitions/additional_software_packages.rb
index 68de7e4..ad89904 100644
--- a/features/step_definitions/additional_software_packages.rb
+++ b/features/step_definitions/additional_software_packages.rb
@@ -139,12 +139,16 @@ When /^I can open the Additional Software configuration window from the notifica
asp = Dogtail::Application.new('tails-additional-software-config')
end
-When /^I disable the Additional Software installation service$/ do
- $vm.execute_successfully('systemctl disable tails-additional-software-install.service')
+When /^I disable the user session's Additional Software installation service$/ do
+ # This service is the one that would otherwise start the system-wide
+ # tails-additional-software-install.service
+ $vm.execute_successfully('systemctl --global disable tails-additional-software-install.service')
end
-When /^I start the Additional Software installation service$/ do
- $vm.execute_successfully('systemctl enable tails-additional-software-install.service')
+When /^I start the system-wide Additional Software installation service$/ do
+ # This service is not enabled by default. In the relevant scenarios,
+ # the other service (user session's tails-additional-software-install.service)
+ # that would start it was disabled so we need to start this one ourselves.
$vm.execute_successfully('systemctl --no-block start tails-additional-software-install.service')
end