influxdata/telegraf

Add tests for internal/snmp

Open

#10,531 opened on Jan 27, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Go (9,892 stars) (4,161 forks)batch import
area/snmphelp wantedsize/mtesting request

Description

Feature Request

Opening a feature request kicks off a discussion.

Proposal:

Add tests for internal/snmp package:

  • ClearCache
  • GetIndex
  • LoadMibsFromPath #10551
  • NewWrapper
  • SetAgent
  • SnmpTranslateCall
  • TrapLookup #10430

Some of these are already covered by tests in plugin/inputs/snmp, but best is to test them at the correct place.

Current behavior:

Changes in code do change behaviour of some plugins.

Desired behavior:

Tests prevent changes in behaviour to the end-users.

Contributor guide