-
Notifications
You must be signed in to change notification settings - Fork 900
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11988 from lfu/snmp_trap_1381287
Fix the issue that alerts don't send SNMP traps. (cherry picked from commit f62e14e) https://bugzilla.redhat.com/show_bug.cgi?id=1381287
- Loading branch information
Showing
2 changed files
with
21 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
describe MiqSnmp do | ||
describe '.trap_v2' do | ||
it 'calls subst_oid' do | ||
expect(MiqSnmp).to receive(:subst_oid).at_least(1).and_return("1.2.3") | ||
|
||
MiqSnmp.trap_v2(:host => ["localhost"], | ||
:sysuptime => 1, | ||
:trap_oid => "info", | ||
:object_list => [{:oid => "1.2.3", :var_type => "Integer", :value => "1"}]) | ||
end | ||
end | ||
end |