Commit e2510fae authored by intrigeri's avatar intrigeri
Browse files

Test suite: have APT tests configure APT to use non-onion sources (refs: #11556).

Our test suite uses Chutney to create a virtual, private Tor network, and thus
doesn't support connections to Onion services running in the real Tor network.

Too bad this change implies that don't exercise exactly the config we ship
anymore, but well, I don't think this should block addressing issues like
https://www.debian.org/security/2016/dsa-3733.

Note that we test in another, dedicated scenario that the URLs in APT sources
have the right (Onion) hostname.
parent 8438ca88
......@@ -13,11 +13,13 @@ Feature: Installing packages through APT
@check_tor_leaks
Scenario: Install packages using apt
When I update APT using apt
When I configure APT to use non-onion sources
And I update APT using apt
Then I should be able to install a package using apt
@check_tor_leaks
Scenario: Install packages using Synaptic
When I start Synaptic
When I configure APT to use non-onion sources
And I start Synaptic
And I update APT using Synaptic
Then I should be able to install a package using Synaptic
......@@ -11,6 +11,23 @@ Given /^the only hosts in APT sources are "([^"]*)"$/ do |hosts_str|
}
end
When /^I configure APT to use non-onion sources$/ do
script = <<-EOF
use strict;
use warnings FATAL => "all";
s{vwakviie2ienjx6t[.]onion}{ftp.us.debian.org};
s{sgvtcaew4bxjd7ln[.]onion}{security.debian.org};
s{sdscoq7snqtznauu[.]onion}{deb.torproject.org};
s{jenw7xbd6tf7vfhp[.]onion}{deb.tails.boum.org};
EOF
# VMCommand:s cannot handle newlines, and they're irrelevant in the
# above perl script any way
script.delete!("\n")
$vm.execute_successfully(
"perl -pi -E '#{script}' /etc/apt/sources.list /etc/apt/sources.list.d/*"
)
end
When /^I update APT using apt$/ do
recovery_proc = Proc.new do
step 'I kill the process "apt"'
......
Supports Markdown
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