File: test_smi.rb

package info (click to toggle)
libsnmp-ruby 1.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny, squeeze, wheezy
  • size: 1,420 kB
  • ctags: 581
  • sloc: ruby: 3,817; makefile: 41
file content (19 lines) | stat: -rw-r--r-- 425 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require 'test/unit'

begin
    require 'smi'

    class TestSmi < Test::Unit::TestCase
    
        include SNMP::SMI

        def test_load
            name, oid_hash = load_smi_module('test/mibs/IF-MIB')
            assert_equal("IF-MIB", name)
            assert_equal("1.3.6.1.2.1.2.2", oid_hash["ifTable"])
        end

    end
rescue LoadError
    # snmp/smi may not always be available because it is a C extention
end