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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user