Open bonki opened 7 years ago
You probably don't want to merge this as it is as there's probably a canonical way of checking for
SNMP::NoSuchInstance
errors, this is merely meant for testing purposes.
Hey, thanks for your contribution.
Hm, hard to decide, in most cases empty oids aren't okay, except this one. So i would propose to name the function somehow like
get_snmp_table_accept_empty_oid
What do you think?
The problem is that get_table
could also fail in case of real session errors (and in this case _accept_empty_oid
is misleading) even if the OID exists in which case this will silently drop any errors and might wrongfully report zero tunnels which is what makes this more of a hack. In my book that's not very pretty error handling but if we can live with that (for the time being, anyway), go for it :)
What do I have to do to get this merged (in which case I'll have to update #36 which is based on latest master)? :)
I have no idea, how this went through, but are you willing to rebase your pull request...?
I can create a PR to implement that one. (if @bonki agrees)
In case of zero configured tunnels
$oid_ipsectuntableroot
does not exist which resulted in the script exiting withExpected: