-
Notifications
You must be signed in to change notification settings - Fork 2
Add full test coverage for the services CRUD and bulk endpoints #42
Copy link
Copy link
Closed
Copy link
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issuearea:testingtestingtestingpriority:highHigh priorityHigh prioritystack:expressstack:expressstack:expressstack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:testTest coverage workTest coverage work
Metadata
Metadata
Assignees
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issuearea:testingtestingtestingpriority:highHigh priorityHigh prioritystack:expressstack:expressstack:expressstack:nodejsNode.jsNode.jsstack:typescriptTypeScriptTypeScripttype:testTest coverage workTest coverage work
Type
Fields
Give feedbackNo fields configured for Feature.
Test the services CRUD and bulk endpoints
Description
The service registry in
src/index.tsexposes register, list (withprefix/q/limit/ETag), get-one, delete, bulk register, price patch, metadata put/get, and disabled toggle — butsrc/health.test.tsonly covers basic register/list and one disabled case. Most of the registry surface is untested. This issue brings the services endpoints to full coverage.Requirements and context
Agentpay-Org/Agentpay-backendonly.POST /api/v1/services(create vs update status codes 201/200),GET /api/v1/services/:serviceId(200 and 404), andDELETE(204 and 404).GET /api/v1/servicesfilters (prefix,q,limit) and the weak-ETag/If-None-Match304 path.POST /api/v1/services/bulk(mixed valid/invalid items, >50 rejection),PATCH .../price,PUT .../metadata+GET .../metadata, andPATCH .../disabled.400 invalid_requestshape (withrequestId) on every validation failure.Suggested execution
git checkout -b test/testing-12-services-crudsrc/services.test.tsusingsupertestagainst the exportedapp.describe/ittitles.Test and commit
npm run build,npm test, andnpm run lint.npm testoutput in the PR description.Example commit message
test: cover services crud, bulk, metadata, and disabled endpointsGuidelines
Community & contribution rewards