summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertagaz <bertagaz@ptitcanardnoir.org>2018-11-19 14:29:12 +0100
committerbertagaz <bertagaz@ptitcanardnoir.org>2018-11-19 14:29:12 +0100
commitbd529d6f7c253bcfe07ca1d6fa7831ef2b82914f (patch)
tree3e499f6d3072ea9942faa0adcf75e5f73bb033bf
parentf19572a4fe1cc7eb20378f0bd46b5eda6f2891f7 (diff)
Test suite: Make apt uninstall step more robust.
Refs: #14596
-rw-r--r--features/step_definitions/apt.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/features/step_definitions/apt.rb b/features/step_definitions/apt.rb
index 3f03dbc..bf18941 100644
--- a/features/step_definitions/apt.rb
+++ b/features/step_definitions/apt.rb
@@ -75,7 +75,8 @@ Then /^I uninstall "(.+)" using apt$/ do |package|
:user => LIVE_USER,
:spawn => true)
try_for(3*60) do
- $vm.execute_successfully("apt-cache policy #{package} | grep -E --line-regexp '\s{2}Installed:\s\(none\)'")
+ state = $vm.execute("apt-cache policy #{package}").stdout.split("\n")[1]
+ /^\s{2}Installed:\s\(none\)$/.match(state) != nil
end
end