diff options
Diffstat (limited to 'test/firemon-arp.exp')
-rwxr-xr-x | test/firemon-arp.exp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/firemon-arp.exp b/test/firemon-arp.exp new file mode 100755 index 000000000..3fc8c2aee --- /dev/null +++ b/test/firemon-arp.exp | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "ping -c 3 192.168.1.1\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "3 packets transmitted" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "firejail\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "Child process initialized" | ||
18 | } | ||
19 | sleep 1 | ||
20 | |||
21 | spawn $env(SHELL) | ||
22 | send -- "firemon --arp\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 2\n";exit} | ||
25 | "192.168.1.1 dev eth0 lladdr" {puts "Debian testing\n";} | ||
26 | "192.168.1.1 dev enp0s3 lladdr" {puts "Centos 7 testing\n";} | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 3\n";exit} | ||
30 | "REACHABLE" | ||
31 | } | ||
32 | sleep 1 | ||
33 | |||
34 | puts "\n" | ||