Skip to content

Commit a663b33

Browse files
committed
Cover CLI client request patterns in api-compat
Add test cases for GET /api/packages/{name} and GET /api/packages without explicit month parameters, matching how the pkgstats-cli client interacts with the API.
1 parent afe2bd8 commit a663b33

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cmd/api-compat/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ var tests = []testCase{
100100
// max valid offset (boundary)
101101
jsonTest("/api/packages?limit=2&offset=100000&" + monthParams),
102102

103+
// --- CLI client specific patterns (no month params) ---
104+
jsonTest("/api/packages/pacman"),
105+
jsonTest("/api/packages?limit=10&query=pac"),
106+
103107
// --- error cases (expect matching HTTP status codes) ---
104108

105109
// invalid limit

0 commit comments

Comments
 (0)