fix(ci): resolve all lint and test failures

- Go: nil-safe profile cache in SNMPCollector, updated test assertion
- ESLint: fix conditional useQuery hook in SNMPMetricsSection
- ESLint: remove unused CREDENTIAL_TYPE_LABELS, ChevronDown/Right,
  EmptyState import, advancedOpen state
- TypeScript: replace empty interface with type alias

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-22 17:45:06 -05:00
parent 023e45c908
commit 0c1ffe0e39
6 changed files with 9 additions and 16 deletions

View File

@@ -20,7 +20,7 @@ func TestSNMPCollectorImplementsCollector(t *testing.T) {
}
// TestSNMPCollectorCollect_NilProfileID verifies that Collect returns an error
// when the device has no SNMPProfileID set.
// when the device has no SNMPProfileID and the profile cache is nil.
func TestSNMPCollectorCollect_NilProfileID(t *testing.T) {
collector := NewSNMPCollector(nil, nil, nil, DefaultSNMPConfig())
dev := store.Device{
@@ -32,7 +32,7 @@ func TestSNMPCollectorCollect_NilProfileID(t *testing.T) {
err := collector.Collect(context.Background(), dev, &bus.Publisher{})
require.Error(t, err)
assert.Contains(t, err.Error(), "no SNMP profile")
assert.Contains(t, err.Error(), "no SNMP profile assigned")
}
// TestSNMPCollectorCollect_UnknownProfileID verifies that Collect returns an error