dataiku / dataiku/kiji-proxy

Add unit tests for src/backend/server/server.go

Open Beginner friendly
#428 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue help wanted
Dominant language
Go
Stars
432
Forks
51
PR merge metrics
No merged PRs in 30d

Description

src/backend/server/server.go (~28KB) handles HTTP request orchestration but has no server_test.go next to it. The rest of the backend (pii/, proxy/, providers/, config/) has companion test files, so the server is an outlier.

What to add

Create src/backend/server/server_test.go covering at least:

  • Happy-path request handling for one provider (OpenAI is fine)
  • Malformed JSON body — should return 400
  • Empty body — should return 400
  • Missing/invalid Authorization header pass-through
  • Concurrent request handling (table-driven with t.Parallel())
Hints
  • Use httptest.NewRecorder() / httptest.NewServer() — see src/backend/proxy/handler_test.go for the pattern already in use here.
  • Stub or fake the PII detector + provider — you don't need a real ONNX model.
  • Run with make test-all or go test ./src/backend/server/....

Difficulty: good first issue, ~1–2 hours.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/backend/server/server.go and compare the test setup in src/backend/proxy/handler_test.go. Create src/backend/server/server_test.go using fake PII and provider components, then run go test ./src/backend/server/... or make test-all; done means coverage for the listed success, error, authorization, and concurrent-request cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, testing
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.