Sha256: 94abc829fd718a7dcb11117ad1b54b1480a213354caaa76aff626b0acc0072b7

Contents?: true

Size: 809 Bytes

Versions: 4

Compression:

Stored size: 809 Bytes

Contents

require production_code
require 'snmpjr/configuration_v3'

describe Snmpjr::SessionV3 do
  describe '.new' do
    it 'creates and attaches the correct user security model (usm)' do
      config = Snmpjr::ConfigurationV3.new
      config.host = 'demo.snmplabs.com'
      config.port = 161
      config.user = 'usr-sha-des'
      config.authentication 'SHA', 'authkey1'
      config.privacy 'DES', 'privkey1'

      session = described_class.new config

      expect(session.snmp.usm.user_table.user_entries.first.usm_user.security_name.to_s).to eq 'usr-sha-des'
      expect(session.snmp.usm.user_table.user_entries.first.usm_user.privacy_passphrase.to_s).to eq 'privkey1'
      expect(session.snmp.usm.user_table.user_entries.first.usm_user.authentication_passphrase.to_s).to eq 'authkey1'

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
snmpjr-0.3.3-java spec/snmpjr/session_v3_spec.rb
snmpjr-0.3.2-java spec/snmpjr/session_v3_spec.rb
snmpjr-0.3.1-java spec/snmpjr/session_v3_spec.rb
snmpjr-0.3.0-java spec/snmpjr/session_v3_spec.rb