Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
57 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module Net | ||
module SNMP | ||
VERSION = "0.1.6" | ||
VERSION = "0.1.7" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') | ||
|
||
describe "snmp traps" do | ||
it "should send a v1 trap" do | ||
pending "still working on it" | ||
Net::SNMP::Session.open(:peername => '127.0.0.1') do |sess| | ||
res = sess.trap | ||
res.should be_true | ||
end | ||
end | ||
|
||
it "should send a v2 inform" do | ||
pending "still working on it" | ||
did_callback = false | ||
|
||
Net::SNMP::Session.open(:peername => '127.0.0.1', :version => '2c') do |sess| | ||
sess.inform do |res| | ||
did_callback = true | ||
end | ||
end | ||
did_callback.should be_true | ||
end | ||
|
||
it "should send v2 trap" do | ||
pending "still working on it" | ||
Net::SNMP::Session.open(:peername => '127.0.0.1', :version => '2c') do |sess| | ||
res = sess.trap_v2 | ||
res.should be_true | ||
end | ||
end | ||
end |