Commit 8be56369 authored by intrigeri's avatar intrigeri
Browse files

Test suite: run ping as root.

For some reason, on Jessie, running ping as a regular users results in "ping:
icmp open socket: Operation not permitted", with exit code == 2. But as root, it
"works" and the firewall blocks the packets. This is rather an improvement than
a problem (stuff is blocked earlier, which is cheaper), so let's just deal with
it in the test suite only, by running ping as root: the main purpose here is to
test the firewall.

This change also affects the netcat command used to open TCP and UDP
connections, for code simplicity's sake. Here again, the goal is to test
the firewall.
parent 7cd74258
......@@ -56,6 +56,6 @@ end
When(/^I send some ICMP pings$/) do
next if @skip_steps_while_restoring_background
# We ping an IP address to avoid a DNS lookup
ping = @vm.execute("ping -c 5 #{SOME_DNS_SERVER}", LIVE_USER)
ping = @vm.execute("ping -c 5 #{SOME_DNS_SERVER}")
assert(ping.success?, "Failed to ping #{SOME_DNS_SERVER}:\n#{ping.stderr}")
......@@ -188,7 +188,7 @@ When /^I open an untorified (TCP|UDP|ICMP) connections to (\S*)(?: on port (\d+)
when "ICMP"
cmd = "ping -c 5 #{host}"
@conn_res = @vm.execute(cmd, LIVE_USER)
@conn_res = @vm.execute(cmd)
Then /^the untorified connection fails$/ do
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