apache / apache/shenyu

[Task] — `ShenyuClientHttpRegistryController` (client registration endpoint) has zero test

Open
#6,678 1 comment 0 reactions 0 assignees View on GitHub
in: test priority: high type: refactor
Dominant language
Java
Stars
8.8k
Forks
3.1k
Avg merge
7d 1h
Merged PRs (30d)
85

Description

- severity: High; files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/ShenyuClientHttpRegistryController.java:45` (register-metadata/uri/apiDoc/discoveryConfig/mcp/offline endpoints); confirmed no `ShenyuClientHttpRegistryControllerTest` references the class
- description: HTTP registration endpoint accepting client registrations from all gateway clients; broken registration = no upstreams routed. `ShenyuHttpRegistryControllerTest` exists for a sibling but does not reference this class.
- suggested_fix: Add `@WebMvcTest` covering register/unregister/registerMetadata endpoints.

---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with shenyu-admin/src/main/java/org/apache/shenyu/admin/controller/ShenyuClientHttpRegistryController.java at line 45, then read ShenyuHttpRegistryControllerTest for the sibling controller's testing pattern. Add @WebMvcTest coverage for the register, unregister, and registerMetadata endpoints, and extend coverage to the listed registration endpoints as appropriate. Done means the controller has tests and no longer has zero test references.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend, testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.