diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-13 14:41:13 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-01-13 14:41:13 -0800 |
commit | f5e621b2c113c45ce661cf5bb27494fce22265a4 (patch) | |
tree | 055e0b196818dda73d321349b1953c7fae853fd9 | |
parent | 8ec813a09136b167c1ac93cd049c6945ec6acddb (diff) | |
download | vyatta-cfg-f5e621b2c113c45ce661cf5bb27494fce22265a4.tar.gz vyatta-cfg-f5e621b2c113c45ce661cf5bb27494fce22265a4.zip |
Fix problems with test program
Interfaces has changed, so need to change tests.
-rw-r--r-- | tests/interface.pl | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/interface.pl b/tests/interface.pl index eaa295f..79f4df4 100644 --- a/tests/interface.pl +++ b/tests/interface.pl @@ -9,10 +9,13 @@ use warnings; use Vyatta::Interface; use Vyatta::Misc qw(getInterfaces getInterfacesIPadresses); +my @interfaces = getInterfaces(); +print "Interfaces: ", join(' ',@interfaces),"\n"; + my @ips = getInterfacesIPadresses('all'); print "IP addresses = ",join(' ',@ips), "\n"; -foreach my $arg (getInterfaces()) { +foreach my $arg (@interfaces) { print "$arg : "; my $intf = new Vyatta::Interface($arg); @@ -32,14 +35,11 @@ foreach my $arg (getInterfaces()) { print "address ", join(' ',@addresses), "\n"; } - foreach my $attr (qw(exists configured disabled using up running)) { + foreach my $attr (qw(exists configured disabled using_dhcp flags up running)) { my $val = $intf->$attr(); - if (defined $val) { - print "\t$attr = $val\n"; - } else { - print "\t$attr is not set\n"; - } + print " $attr=$val" if ($val); } + print "\n"; } exit 0; |