[TT-15243] Influx2 latency metric #900
Merged
probelabs / Visor: style
succeeded
Oct 8, 2025 in 4m 54s
✅ Check Passed (Warnings Found)
style check passed. Found 1 warning, but fail_if condition was not met.
Details
📊 Summary
- Total Issues: 1
- Warning Issues: 1
🐛 Issues by Category
🎨 Style (1)
⚠️ pumps/influx2_test.go:32 - The testTestInflux2PumpMappingIncludesLatencyduplicates the mapping logic frompumps/influx2.goinstead of testing the production code directly. This makes the test brittle, as changes in the production mapping logic will not be caught by this test, and the test itself will need to be manually kept in sync.
Generated by Visor - AI-powered code review
Annotations
Check warning on line 49 in pumps/influx2_test.go
probelabs / Visor: style
style Issue
The test `TestInflux2PumpMappingIncludesLatency` duplicates the mapping logic from `pumps/influx2.go` instead of testing the production code directly. This makes the test brittle, as changes in the production mapping logic will not be caught by this test, and the test itself will need to be manually kept in sync.
Raw output
Refactor the mapping creation in `pumps/influx2.go` into a separate, testable function. This new function can then be called from both the `WriteData` method and this test, ensuring the test validates the actual production logic and improving maintainability.
Loading