1
# -*- mode:python; coding:utf-8 -*-
3
Test('ip link | grep eth0 | grep "state UP"',
4
desc="interface link up",
7
Test("ping -c2 $(/sbin/route -n | grep ^0.0.0.0 | awk '{print $2}')",
8
desc="local router reachable",
11
for line in file('/etc/resolv.conf'):
12
if not line.startswith('nameserver'): continue
13
Test('ping -c 2 %s' % line.split(' ')[1],
14
desc="DNS server reachable")
16
Test('host www.google.com',
17
desc="Resolve google website")
19
Test('ping -c 1 www.google.com',
20
desc="google reachable")
22
Test('wget http://www.google.com/index.html',
23
desc="Download google HTTP index")