discovery/test: assert ProcessSyncTransition error in sync transition test
What changed, and why it matters
This commit only adds a missing error check inside a unit test. It does not change any production code, so it cannot introduce or fix a security vulnerability in the running software. It simply makes the test fail loudly if the function being tested ever starts returning an unexpected error.
No security action needed. Treat as normal code-quality/test-improvement commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change is in discovery/syncer_test.go. TestGossipSyncerSyncTransitions previously called syncer.ProcessSyncTransition() and ignored its returned error. The patch captures the error and asserts require.NoError(t, err). This is a test-hardening improvement with no runtime behavior change.
Changed components
discovery/syncer_test.goInspect captured patch +2 / −1
diff --git a/discovery/syncer_test.go b/discovery/syncer_test.go
index 7385886..1fd0072 100644
--- a/discovery/syncer_test.go
+++ b/discovery/syncer_test.go
@@ -2321,7 +2321,8 @@ func TestGossipSyncerSyncTransitions(t *testing.T) {
syncer.Start()
defer syncer.Stop()
- syncer.ProcessSyncTransition(test.finalSyncType)
+ err := syncer.ProcessSyncTransition(test.finalSyncType)
+ require.NoError(t, err)
// The syncer should now have the expected final
// SyncerType that the test expects.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.