summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-03-05 10:44:03 +0000
committerintrigeri <intrigeri@boum.org>2019-03-05 10:44:03 +0000
commitdd27a9201c1a2e8bd5f9a7cdccc26dea9eaf0cad (patch)
tree6c466d3f329cbcc9f8f915d73fb1e313446798e7
parentc19a71a94a40e5676de2b782295428f99bd5ec4f (diff)
Test suite: make function names clearer and less generic (refs: #14596)
-rw-r--r--features/step_definitions/apt.rb8
-rw-r--r--features/step_definitions/common_steps.rb4
2 files changed, 6 insertions, 6 deletions
diff --git a/features/step_definitions/apt.rb b/features/step_definitions/apt.rb
index 4941bad..f84e8b2 100644
--- a/features/step_definitions/apt.rb
+++ b/features/step_definitions/apt.rb
@@ -51,7 +51,7 @@ When /^I update APT using apt$/ do
end
end
-def check_for_installation(package)
+def wait_for_package_installation(package)
try_for(2*60) do
$vm.execute_successfully("dpkg -s '#{package}' 2>/dev/null | grep -qs '^Status:.*installed$'")
end
@@ -70,12 +70,12 @@ Then /^I install "(.+)" using apt$/ do |package|
"sudo -S DEBIAN_PRIORITY=critical apt -y install #{package}",
:user => LIVE_USER,
:spawn => true)
- check_for_installation(package)
+ wait_for_package_installation(package)
end
end
end
-def check_for_removal(package)
+def wait_for_package_removal(package)
try_for(3*60) do
# Once purged, a package is removed from the installed package status database
# and "dpkg -s" returns a non-zero exit code
@@ -88,7 +88,7 @@ Then /^I uninstall "(.+)" using apt$/ do |package|
"sudo -S apt -y purge #{package}",
:user => LIVE_USER,
:spawn => true)
- check_for_removal(package)
+ wait_for_package_removal(package)
end
When /^I configure APT to prefer an old version of cowsay$/ do
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index 3fdee9c..7a802a2 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -590,12 +590,12 @@ end
Given /^the package "([^"]+)" is( not)? installed( after Additional Software has been started)?$/ do |package, absent, asp|
if absent
- check_for_removal(package)
+ wait_for_package_removal(package)
else
if asp
step 'the Additional Software installation service has started'
end
- check_for_installation(package)
+ wait_for_package_installation(package)
end
end