perl/SNMP/t/dump-session.t
raw| 1 | #!./perl |
| 2 | |
| 3 | use strict; |
| 4 | use warnings; |
| 5 | use Test; |
| 6 | |
| 7 | BEGIN { |
| 8 | eval "use Cwd qw(abs_path)"; |
| 9 | plan tests => 1; |
| 10 | } |
| 11 | |
| 12 | use SNMP; |
| 13 | use Data::Dumper; |
| 14 | require "t/startagent.pl"; |
| 15 | use vars qw($agent_host $agent_port $comm); |
| 16 | |
| 17 | # See also https://sourceforge.net/p/net-snmp/bugs/2488/ |
| 18 | |
| 19 | my $s = new SNMP::Session(DestHost=>$agent_host, Version=>1, Community=>$comm, |
| 20 | RemotePort=>$agent_port); |
| 21 | |
| 22 | print Dumper($s->get('anything')); |
| 23 | |
| 24 | ok(1); |
| 25 | |
| 26 | snmptest_cleanup(); |