#72

test(go-sdk): expand test coverage

Opendoitrouswants to merge intofrom

Expands sdk/go/classifier_test.go from 4 tests to 12:

  • Input validation: empty/nil inputs, too few labels, empty labels slice
  • Multi-label happy path: multi=true on the wire, labels array in response
  • User-Agent header: verifies classifier-dev-go/0.1.0
  • API key header: Authorization: Bearer reaches the server
  • Result count mismatch: 1 result for 2 inputs → error
  • Cancelled context: pre-cancelled ctx never reaches the server
  • Options on the wire: tier, instructions, multi, max_labels all serialized

All tests use httptest.NewServer — no network calls.

🤖 Generated with Claude Code

Activity

2
coderabbitai[bot]1mo ago

WARNING

Review limit reached

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 291d3f75-ed2b-4268-8ff0-4031bcf0b74f

📥 Commits

Reviewing files that changed from the base of the PR and between 5c241afbb44e01f9e60a2d6184b6ce3621c83b36 and 6adff728581538a183f468992bbef56039f36363.

📒 Files selected for processing (1)
  • sdk/go/classifier_test.go

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.