From 141812bf4ddd64588ee438167ea02f97b057bb9a Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 20 Apr 2019 07:36:17 +0100 Subject: [PATCH] add v3 Context update() tests for net-snmp 5.8+ --- xt/lib/Test/SNMP/Info.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xt/lib/Test/SNMP/Info.pm b/xt/lib/Test/SNMP/Info.pm index b6464a28..fd527b49 100644 --- a/xt/lib/Test/SNMP/Info.pm +++ b/xt/lib/Test/SNMP/Info.pm @@ -65,8 +65,12 @@ TODO: { # We also could connect to http://snmplabs.com v3 simulator but would # prefer to keep those tests isolated to 10_remote_snmplabs.t - we could # also move the update() tests to that file. - todo_skip "Revisit v3 Context update() tests when using Net-SNMP 5.8+", 4 - if 1; + + my $version = $SNMP::VERSION; + my ( $major, $minor, $rev ) = split( '\.', $version ); + + todo_skip "Skip v3 Context update() tests when using Net-SNMP < 5.8", 4 + if ($major < 5 or $minor < 8); # Starting context ok(!defined $test->{info}{sess}{Context}, q(Context doesn't exist));