Commit 3761ed0a authored by bertagaz's avatar bertagaz Committed by intrigeri
Browse files

Test suite: take into account that apt(8) won't return when run in the remote...

Test suite: take into account that apt(8) won't return when run in the remote shell with the ASP hooks enabled.

This cherry-picks commit:26f89d52 aka. "Test
suite: Temoorary fix bug in APT hooks introduced by ASP" whose original commit
message was:

  At the moment, APT waits for the DPKG post install hook notification to
  be clicked on before returning, which is a bug that should be fixed with
  ticket #15382. Meanwhile we have to run APT install in the background
  and check when the package is installed to go on with the feature.

As bertagaz clarified later (https://labs.riseup.net/code/issues/15382#note-12),
for some reason that remains to be investigated, we still need this workaround
despite the ASP's apt-post hook now being non-blocking.

Refs: #14596
parent 477d3257
......@@ -70,9 +70,13 @@ Then /^I install "(.+)" using apt$/ do |package_name|
end
retry_tor(recovery_proc) do
Timeout::timeout(2*60) do
$vm.execute_successfully("echo #{@sudo_password} | " +
$vm.execute("echo #{@sudo_password} | " +
"sudo -S DEBIAN_PRIORITY=critical apt -y install #{package_name}",
:user => LIVE_USER)
:user => LIVE_USER,
:spawn => true)
try_for(60) do
$vm.execute_successfully("dpkg -s '#{package_name}' 2>/dev/null | grep -qs '^Status:.*installed$'")
end
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment