Skip to content

refactor(tests): route, stop, and trip handler tests with the new response model#957

Open
Ahmedhossamdev wants to merge 2 commits into
mainfrom
refactor/typed-route-stop-trip-tests
Open

refactor(tests): route, stop, and trip handler tests with the new response model#957
Ahmedhossamdev wants to merge 2 commits into
mainfrom
refactor/typed-route-stop-trip-tests

Conversation

@Ahmedhossamdev
Copy link
Copy Markdown
Member

Update the trip, route, stops tests to use new response type models for parsing the JSON responses.

@Ahmedhossamdev Ahmedhossamdev requested a review from fletcherw May 16, 2026 23:02
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Warning

Rate limit exceeded

@Ahmedhossamdev has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 22 minutes and 36 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c7405811-a38c-4739-b38f-164cc6833db0

📥 Commits

Reviewing files that changed from the base of the PR and between 2f29632 and cfc24d4.

📒 Files selected for processing (4)
  • internal/restapi/response_types.go
  • internal/restapi/route_handler_test.go
  • internal/restapi/stop_handler_test.go
  • internal/restapi/trip_handler_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/typed-route-stop-trip-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

Performance Smoke Test Results

Status: PASSED

Metric Value
p(95) latency 2.0 ms
Error rate 0.00%
Total requests 335
Req/sec 11.0

Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%.

Full results uploaded as workflow artifact: k6-smoke-summary.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Performance Smoke Test Results

Status: PASSED

Metric Value
p(95) latency 2.0 ms
Error rate 0.00%
Total requests 332
Req/sec 11.0

Smoke test config: 5 VUs x 30s. Thresholds: p(95) < 300ms, error rate < 1%.

Full results uploaded as workflow artifact: k6-smoke-summary.

assert.True(t, ok, "routeIds should exist and be an array")
assert.NotEmpty(t, routeIds, "routeIds should not be empty")

staticRouteIds, ok := entry["staticRouteIds"].([]any)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

what's up with the staticRouteIds field? Should you be testing that as part of this test too?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants