diff options
author | Philip Hands <phil@hands.com> | 2017-06-29 22:11:09 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2017-08-01 00:53:58 -0400 |
commit | a6f41c35e337db192e612ee6e1545fcae4c69ac7 (patch) | |
tree | 3d03ff353fee11bb00de060f73c6b4d040173e9a /cucumber/features/step_definitions/firewall_leaks.rb | |
parent | c49069662ccf276a7b97f77524f3e2638c9fa152 (diff) | |
download | jenkins.debian.net-a6f41c35e337db192e612ee6e1545fcae4c69ac7.tar.xz |
lvc: grab updates from tails (01371c19bd..6ae59c49e5)
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'cucumber/features/step_definitions/firewall_leaks.rb')
-rw-r--r-- | cucumber/features/step_definitions/firewall_leaks.rb | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/cucumber/features/step_definitions/firewall_leaks.rb b/cucumber/features/step_definitions/firewall_leaks.rb index 942d00b8..0cd94cca 100644 --- a/cucumber/features/step_definitions/firewall_leaks.rb +++ b/cucumber/features/step_definitions/firewall_leaks.rb @@ -1,29 +1,6 @@ -Then(/^the firewall leak detector has detected (.*?) leaks$/) do |type| - leaks = FirewallLeakCheck.new(@sniffer.pcap_file, - :accepted_hosts => get_all_tor_nodes) - case type.downcase - when 'ipv4 tcp' - if leaks.ipv4_tcp_leaks.empty? - leaks.save_pcap_file - raise "Couldn't detect any IPv4 TCP leaks" - end - when 'ipv4 non-tcp' - if leaks.ipv4_nontcp_leaks.empty? - leaks.save_pcap_file - raise "Couldn't detect any IPv4 non-TCP leaks" - end - when 'ipv6' - if leaks.ipv6_leaks.empty? - leaks.save_pcap_file - raise "Couldn't detect any IPv6 leaks" - end - when 'non-ip' - if leaks.nonip_leaks.empty? - leaks.save_pcap_file - raise "Couldn't detect any non-IP leaks" - end - else - raise "Incorrect packet type '#{type}'" +Then(/^the firewall leak detector has detected leaks$/) do + assert_raise(FirewallAssertionFailedError) do + step 'all Internet traffic has only flowed through Tor' end end @@ -40,12 +17,12 @@ Given(/^I disable Tails' firewall$/) do end When(/^I do a TCP DNS lookup of "(.*?)"$/) do |host| - lookup = $vm.execute("host -T #{host} #{SOME_DNS_SERVER}", :user => LIVE_USER) + lookup = $vm.execute("host -T -t A #{host} #{SOME_DNS_SERVER}", :user => LIVE_USER) assert(lookup.success?, "Failed to resolve #{host}:\n#{lookup.stdout}") end When(/^I do a UDP DNS lookup of "(.*?)"$/) do |host| - lookup = $vm.execute("host #{host} #{SOME_DNS_SERVER}", :user => LIVE_USER) + lookup = $vm.execute("host -t A #{host} #{SOME_DNS_SERVER}", :user => LIVE_USER) assert(lookup.success?, "Failed to resolve #{host}:\n#{lookup.stdout}") end |