Added function test of ecs type subscriptions
[nonrtric.git] / test / common / README.md
index 4edfcbb..6c277bd 100644 (file)
@@ -130,7 +130,7 @@ The script can be started with these arguments
 
 | arg list |
 |--|
-| `remote\|remote-remove docker\|kube --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+]  [--use-snapshot-image <app-nam>+] [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+] [--image-repo <repo-address>] [--repo-policy local\|remote] [--cluster-timeout <timeout-in-seconds>]` |
+| `remote\|remote-remove docker\|kube --env-file <environment-filename> [release] [auto-clean] [--stop-at-error] [--ricsim-prefix <prefix> ] [--use-local-image <app-nam>+]  [--use-snapshot-image <app-nam>+] [--use-staging-image <app-nam>+] [--use-release-image <app-nam>+] [--image-repo <repo-address>] [--repo-policy local\|remote] [--cluster-timeout <timeout-in-seconds>]  [--print-stats]` |
 
 | parameter | description |
 |-|-|
@@ -150,6 +150,7 @@ The script can be started with these arguments
 | `--image-repo` |  Url to optional image repo. Only locally built images will be re-tagged and pushed to this repo |
 | `-repo-policy` |  Policy controlling which images to re-tag and push to image repo in param --image-repo. Can be set to 'local' (push on locally built images) or 'remote' (push locally built images and images from nexus repo). Default is 'local' |
 | `--cluster-timeout` |  Optional timeout for cluster where it takes time to obtain external ip/host-name. Timeout in seconds |
+| `--print-stats` |  Prints the number of tests, failed tests, failed configuration and deviations after each individual test or config |
 | `help` | Print this info along with the test script description and the list of app short names supported |
 
 ## Function: setup_testenvironment ##
@@ -1037,6 +1038,48 @@ Check the contents of all ric events received for a callback id.
 | `EMPTY` | Indicator for an empty list  |
 | `<ric-id>` | Id of the ric  |
 
+## Function: cr_api_check_all_ecs_events() ##
+
+Check the contents of all current status events for one id from ECS
+
+| arg list |
+|--|
+| `<response-code> <id> [ EMPTY \| ( <status> )+ ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<id>` | Id of the callback destination  |
+| `EMPTY` | Indicator for an empty list  |
+| `<status>` | Status string  |
+
+## Function: cr_api_check_all_ecs_subscription_events() ##
+
+Check the contents of all current subscription events for one id from ECS
+
+| arg list |
+|--|
+| `<response-code> <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<id>` | Id of the callback destination  |
+| `EMPTY` | Indicator for an empty list  |
+| `<type-id>` | Id of the data type  |
+| `<schema>` | Path to typeschema file  |
+| `<registration-status>` | Status string  |
+
+
+## Function: cr_api_reset() ##
+
+Reset the callback receiver
+
+| arg list |
+|--|
+| - |
+
+
 # Description of functions in ecs_api_functions.sh #
 
 ## Function: use_ecs_rest_http ##
@@ -1626,20 +1669,98 @@ To also test the response payload add a path to the expected schema file.
 
 ## Function: ecs_api_idc_get_job_status() ##
 
-Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' and optional check of the returned status.
-To test the response code only, provide the response code, type id and job id.
+Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' and optional check of the returned status and timeout.
+To test the response code only, provide the response code and job id.
 To also test the response payload add the expected status.
 
 | arg list |
 |--|
-| `<response-code> <type-id> <job-id> [<status>]` |
+| `<response-code> <job-id> [<status> [ <timeout>]]` |
 
 | parameter | description |
 | --------- | ----------- |
 | `<response-code>` | Expected http response code |
-| `<type-id>` | Id of the Info type  |
 | `<job-id>` | Id of the job  |
 | `<status>` | Expected status  |
+| `<timeout>` | Timeout |
+
+## Function: ecs_api_idc_get_job_status2() ##
+
+Test of GET '/data-consumer/v1/info-jobs/{infoJobId}/status' with returned producers and optional check of the returned status and timeout.
+To test the response code only, provide the response code and job id.
+To also test the response payload add the expected status.
+
+| arg list |
+|--|
+| `<response-code> <job-id> [<status> EMPTYPROD|( <prod-count> <producer-id>+ ) [<timeout>]]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<job-id>` | Id of the job  |
+| `<status>` | Expected status  |
+| `<EMPTYPROD>` | Indicated for empty list of producer  |
+| `<prod-count>` | Number of expected producer  |
+| `<producer-id>` |Id of the producer  |
+| `<timeout>` | Timeout |
+
+
+## Function: ecs_api_idc_get_subscription_ids() ##
+Test of GET '/data-consumer/v1/info-type-subscription' with the returned list of subscription ids
+
+| arg list |
+|--|
+| `<response-code>  <owner-id>|NOOWNER [ EMPTY | <subscription-id>+]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<owner-id>` | Id of the owner  |
+| `<NOOWNER>` | Indicator for empty owner  |
+| `<EMPTY>` | Indicated for empty list of subscription ids  |
+| `<subscription-id>` |Id of the subscription  |
+
+## Function: ecs_api_idc_get_subscription() ##
+Test of GET '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the subscription information
+
+| arg list |
+|--|
+| `<response-code>  <subscription-id> [ <owner-id> <status-uri> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<subscription-id>` |Id of the subscription  |
+| `<owner-id>` | Id of the owner  |
+| `<status-uri>` | Url for status notifications  |
+
+
+## Function: ecs_api_idc_put_subscription() ##
+Test of PUT '/data-consumer/v1/info-type-subscription/{subscriptionId}' with the subscription information
+
+| arg list |
+|--|
+| `<response-code>  <subscription-id> <owner-id> <status-uri>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<subscription-id>` |Id of the subscription  |
+| `<owner-id>` | Id of the owner  |
+| `<status-uri>` | Url for status notifications  |
+
+## Function: ecs_api_idc_delete_subscription() ##
+Test of DELETE /data-consumer/v1/info-type-subscription/{subscriptionId}
+
+| arg list |
+|--|
+| `<response-code>  <subscription-id>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected http response code |
+| `<subscription-id>` |Id of the subscription  |
+
 
 ## Function: ecs_api_admin_reset() ##