...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
executeSearchForMatchingPublicProperties: post: description: Execute search to get all cm handles for the given public properties tags: - network-cm-proxy summary: Execute cm handle search using operationId: executeSearchForMatchingPublicProperties requestBody: required: true content: application/json: schema: $ref: 'components.yaml#/components/schemas/PublicProperties' responses: 200: description: OK content: application/json: schema: type: array items: type: string 400: $ref: 'components.yaml#/components/responses/BadRequest' 401: $ref: 'components.yaml#/components/responses/Unauthorized' 403: $ref: 'components.yaml#/components/responses/Forbidden' 404: $ref: 'components.yaml#/components/responses/NotFound' 500: $ref: 'components.yaml#/components/responses/InternalServerError' |
Testing
Edge Cases
- Null name, Value
- Empty name, Value
- no key value pairs at all
Manual Testing
...
Data
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''PNFDemo'']/public-properties[@name=''Contact'']', '{"name": "Contact", "value": "newemailforstore@bookstore.com"}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore4'']/public-properties[@name=''color'']', '{"name": "color", "value": ""}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore3'']/public-properties[@name=''color'']', '{"name": "color", "value": "red"}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore2'']/public-properties[@name=''Contact'']', '{"name": "Contact", "value": "newemailforstore2@bookstore.com"}'); INSERT INTO public.fragment (xpath, "attributes") VALUES('/dmi-registry/cm-handles[@id=''Bookstore1'']/public-properties[@name=''Contact'']', '{"name": "Contact", "value": "newemailforstore@bookstore.com"}'); |
URL
http://localhost:8883/ncmp/v1/data/ch/searches
Results
Happy Path
# | Scenario | Request | Response |
---|---|---|---|
1 | Both properties match (Return CM Handles Returned that Match) | { | [ |
2 | No properties given - all cm handles returned (that contain public properties) | { "publicCmHandleProperties": { | [ |
Edge Cases
# | Scenario | Request | Response |
---|---|---|---|
1 | Value doesn't match (Nothing Returned) | { | [ ] |
2 | Unknown properties given - NO cm handles returned (Return Empty Response) | { | [ ] |
3 | Empty property name Return 400 (BAD_REQUEST) | { "publicCmHandleProperties": { | { |
4 | Empty value (Return CM Handles Returned that Match) | { "publicCmHandleProperties": { | [ |
...