Skip to content

Conversation

@andig
Copy link
Member

@andig andig commented Jan 2, 2026

Fix #20749

@andig andig marked this pull request as draft January 2, 2026 13:06
@andig andig added the bug Something isn't working label Jan 2, 2026
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • In TestPublishSocAndRangeVehiclesAndChargers, consider using t.Run(tc.name, func(t *testing.T) { ... }) instead of a plain loop plus t.Log, so that each case runs as a named subtest and is easier to target and debug.
  • For offlineVehicle.EXPECT().Soc().AnyTimes() and similar expectations without explicit .Return(...), you are relying on gomock's zero-value defaults; if the behavior matters, it would be clearer and safer to specify the return values explicitly to avoid accidental reliance on mock defaults.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `TestPublishSocAndRangeVehiclesAndChargers`, consider using `t.Run(tc.name, func(t *testing.T) { ... })` instead of a plain loop plus `t.Log`, so that each case runs as a named subtest and is easier to target and debug.
- For `offlineVehicle.EXPECT().Soc().AnyTimes()` and similar expectations without explicit `.Return(...)`, you are relying on gomock's zero-value defaults; if the behavior matters, it would be clearer and safer to specify the return values explicitly to avoid accidental reliance on mock defaults.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Planner: charger soc not evaluated for offline vehicle

2 participants