From 13ef7fba2bdf48319f68a7362779c41edae19651 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 20 Nov 2016 21:23:10 -0500 Subject: testing --- test/environment/dns.exp | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'test/environment') diff --git a/test/environment/dns.exp b/test/environment/dns.exp index a6a7171eb..40403aade 100755 --- a/test/environment/dns.exp +++ b/test/environment/dns.exp @@ -4,6 +4,31 @@ set timeout 30 spawn $env(SHELL) match_max 100000 +send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1\r" +expect { + timeout {puts "TESTING ERROR 2.1\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "cat /etc/resolv.conf\r" +expect { + timeout {puts "TESTING ERROR 2.2\n";exit} + "nameserver 8.8.4.4" +} +expect { + timeout {puts "TESTING ERROR 2.3\n";exit} + "nameserver 8.8.8.8" +} +expect { + timeout {puts "TESTING ERROR 2.4\n";exit} + "nameserver 4.2.2.1" +} +after 100 +send -- "exit\r" +after 100 + + # no chroot send -- "firejail --trace --dns=208.67.222.222 wget -q debian.org\r" expect { @@ -27,28 +52,6 @@ after 100 send -- "rm index.html\r" after 100 send -- "exit\r" -sleep 1 - -send -- "firejail --dns=8.8.4.4 --dns=8.8.8.8 --dns=4.2.2.1\r" -expect { - timeout {puts "TESTING ERROR 2.1\n";exit} - "Child process initialized" -} -sleep 1 - -send -- "cat /etc/resolv.conf\r" -expect { - timeout {puts "TESTING ERROR 2.2\n";exit} - "nameserver 8.8.4.4" -} -expect { - timeout {puts "TESTING ERROR 2.3\n";exit} - "nameserver 8.8.8.8" -} -expect { - timeout {puts "TESTING ERROR 2.4\n";exit} - "nameserver 4.2.2.1" -} after 100 puts "\nall done\n" -- cgit v1.2.3-54-g00ecf