`cbs_api_function.sh` \
All functions are implemented in `consul_api_function.sh`.
+`chartmus_api_functions.sh` \
+Contains functions for managing a Chartmuseum instance.
+
`clean-docker.sh` \
Cleans all containers started by the test environment in docker.
`genstat.sh` \
This script collects container statistics to a file. Works both in docker and kubernetes (only for docker runtime).
+`helmmanager_api_functions.sh` \
+Contains functions for managing and testing of the Helm Manager.
+
`http_proxy_api_functions.sh` \
Contains functions for managing the Http Proxy.
`kube_proxy_api_functions.sh` \
Contains functions for managing the Kube Proxy - to gain access to all services pod inside a kube cluster or all containers in a private docker network.
+`localhelm_api_functions.sh` \
+Contains functions for helm access on localhost.
+
`mr_api_functions.sh` \
Contains functions for managing the MR Stub and the Dmaap Message Router
| __<app-short_name>_store_docker_logs |
| __<app-short_name>_initial_setup |
| __<app-short_name>_statisics_setup |
+| __<app-short_name>_test_requirements |
In addition, all other functions used for testing of the application shall also be added to the file. For example functions to start the application, setting interface parameters as well as functions to send rest call towards the api of the application and validating the result.
| `--override <file>` | Override setting from the file supplied by --env-file |
| `--pre-clean` | Clean kube resouces when running docker and vice versa |
| `--gen-stats` | Collect container/pod runtime statistics |
+| `--delete-namespaces` | Delete kubernetes namespaces before starting tests - but only those created by the test scripts. Kube mode only. Ignored if running with prestarted apps. |
+| `--delete-containers` | Delete docker containers before starting tests - but only those created by the test scripts. Docker mode only. |
+| `--endpoint-stats` | Collect http endpoint statistics |
| `help` | Print this info along with the test script description and the list of app short names supported |
## Function: setup_testenvironment ##
|--|
| None |
+# Description of functions in chartmus_api_function.sh #
+
+## Function: start_chart_museum ##
+
+Start the Chart Museum
+| arg list |
+|--|
+| None |
+
+## Function: chartmus_upload_test_chart ##
+
+Upload a package chart to chartmusem
+| arg list |
+|--|
+| `<chart-name>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<chart-name>` | Name of the chart to upload |
+
+## Function: chartmus_delete_test_chart ##
+
+Delete a chart in chartmusem
+| arg list |
+|--|
+| `<chart-name> [<version>]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<chart-name>` | Name of the chart to delete |
+| `<version>` | Chart version, default is 0.1.0 |
+
+
# Description of functions in consul_api_function.sh #
## Function: consul_config_app ##
See the 'cr' dir for more details.
| arg list |
|--|
-| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+| `<cr-path-id> <variable-name> <target-value> [ <timeout-in-sec> ]` |
| parameter | description |
| --------- | ----------- |
+| `<cr-path-id>` | Variable index to CR |
+| `<variable-name>` | Variable name in the CR |
+| `<target-value>` | Target value for the variable |
+| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value |
+
+## Function: cr_greater_or_equal ##
+Tests if a variable value in the Callback Receiver (CR) simulator is equal to or greater than a target value.
+Without the timeout, the test sets pass or fail immediately depending on if the variable is equal to or greater than the target or not.
+With the timeout, the test waits up to the timeout seconds before setting pass or fail depending on if the variable value becomes equal to the target value or not.
+See the 'cr' dir for more details.
+| arg list |
+|--|
+| `<cr-path-id> <variable-name> <target-value> [ <timeout-in-sec> ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<cr-path-id>` | Variable index to CR |
| `<variable-name>` | Variable name in the CR |
| `<target-value>` | Target value for the variable |
| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value |
| arg list |
|--|
-| `<variable-name> <target-value> [ <timeout-in-sec> ]` |
+| `<cr-path-id> <variable-name> <target-value> [ <timeout-in-sec> ]` |
| parameter | description |
| --------- | ----------- |
+| `<cr-path-id>` | Variable index to CR |
| `<variable-name>` | Variable name in the CR |
| `<target-value>` | Target substring for the variable |
| `<timeout-in-sec>` | Max time to wait for the variable to reach the target value |
See the 'mrstub' dir for more details.
| arg list |
|--|
-| `<variable-name>` |
+| `<cr-path-id> <variable-name>` |
| parameter | description |
| --------- | ----------- |
+| `<cr-path-id>` | Variable index to CR |
| `<variable-name>` | Variable name in the CR |
## Function: cr_delay_callback ##
| arg list |
|--|
-| `<response-code> <id> [ EMPTY \| ( <ric-id> )+ ]` |
+| `<response-code> <cr-path-id> <id> [ EMPTY \| ( <ric-id> )+ ]` |
| parameter | description |
| --------- | ----------- |
| `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index for CR |
| `<id>` | Id of the callback destination |
| `EMPTY` | Indicator for an empty list |
| `<ric-id>` | Id of the ric |
| arg list |
|--|
-| `<response-code> <id> [ EMPTY \| ( <status> )+ ]` |
+| `<response-code> <cr-path-id> <id> [ EMPTY \| ( <status> )+ ]` |
| parameter | description |
| --------- | ----------- |
| `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index for CR |
| `<id>` | Id of the callback destination |
| `EMPTY` | Indicator for an empty list |
| `<status>` | Status string |
| arg list |
|--|
-| `<response-code> <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
+| `<response-code> <cr-path-id> <id> [ EMPTY | ( <type-id> <schema> <registration-status> )+ ]` |
| parameter | description |
| --------- | ----------- |
| `<response-code>` | Expected http response code |
+| `<cr-path-id>` | Variable index for CR |
| `<id>` | Id of the callback destination |
| `EMPTY` | Indicator for an empty list |
| `<type-id>` | Id of the data type |
| arg list |
|--|
-| - |
+| `<cr-path-id>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<cr-path-id>` | Variable index for CR |
## Function: cr_api_check_all_genric_json_events ##
|--|
| None |
+# Description of functions in helmmanager_api_functions.sh #
+
+## Function: use_helm_manager_http ##
+
+Use http for all API calls to the Helm Manager. This is the default protocol.
+| arg list |
+|--|
+| None |
+
+## Function: use_helm_manager_https ##
+
+Use https for all API calls to the Helm Manager.
+| arg list |
+|--|
+| None |
+
+## Function: start_helm_manager ##
+
+Start the Helm Manager container in docker or kube depending on running mode.
+| arg list |
+|--|
+| None |
+
+## Function: helm_manager_api_get_charts ##
+
+Get all charts and compare the expected contents.
+| arg list |
+|--|
+| `<response-code> [ EMPTY | ( <chart> <version> <namespace> <release> <repo> )+ ]` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `EMPTY` | Indicator for empty list |
+| `<chart>`| Name of the chart |
+| `<version>`| Version of the chart |
+| `<namespace>`| Namespace to of the chart |
+| `<release>`| Release name of the chart |
+| `<repo>`| Repository of the chart |
+
+## Function: helm_manager_api_post_repo ##
+
+Add repo to the helm manager.
+| arg list |
+|--|
+| `<response-code> <repo-name> <repo-protocol> <repo-address> <repo-port>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<repo-name>` | Name of the repo |
+| `<repo-protocol>`| Protocol http or https |
+| `<repo-address>`| Host name of the repo |
+| `<repo-port>`| Host port of the repo |
+
+## Function: helm_manager_api_post_onboard_chart ##
+
+Onboard a chart to the helm manager.
+| arg list |
+|--|
+| `<response-code> <repo> <chart> <version> <release> <namespace>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<repo>`| Target repo of the chart |
+| `<chart>`| Name of the chart |
+| `<version>`| Version of the chart |
+| `<namespace>`| Namespace to of the chart |
+| `<release>`| Release name of the chart |
+
+## Function: helm_manager_api_post_install_chart ##
+
+Install an onboarded chart.
+| arg list |
+|--|
+| `<response-code> <chart> <version>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart |
+| `<version>`| Version of the chart |
+
+## Function: helm_manager_api_uninstall_chart ##
+
+Uninstall a chart.
+| arg list |
+|--|
+| `<response-code> <chart> <version>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart |
+| `<version>`| Version of the chart |
+
+## Function: helm_manager_api_delete_chart ##
+
+Delete a chart.
+| arg list |
+|--|
+| `<response-code> <chart> <version>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<chart>`| Name of the chart |
+| `<version>`| Version of the chart |
+
+## Function: helm_manager_api_exec_add_repo ##
+
+Add repo in helm manager by helm using exec.
+| arg list |
+|--|
+| `<repo-name> <repo-url>` |
+
+| parameter | description |
+| --------- | ----------- |
+| `<response-code>` | Expected response code |
+| `<repo-name>`| Name of the repo |
+| `<repo-url>`| Full url to the repo. Url must be accessible by the container |
+
+
# Description of functions in ics_api_functions.sh #
## Function: use_ics_rest_http ##
|--|
| None |
+# Description of functions in localhelm_api_functions.sh #
+
+## Function: localhelm_create_test_chart ##
+
+Create a dummy chart using helm
+| arg list |
+|--|
+| `chart-name` |
+
+| parameter | description |
+| --------- | ----------- |
+| `chart-name` | Name of the chart |
+
+## Function: localhelm_package_test_chart ##
+
+Package a dummy chart using helm
+| arg list |
+|--|
+| `chart-name` |
+
+| parameter | description |
+| --------- | ----------- |
+| `chart-name` | Name of the chart |
+
+## Function: localhelm_installed_chart_release ##
+
+Check if a chart is installed or not using helm
+| arg list |
+|--|
+| `INSTALLED|NOTINSTALLED <release-name> <name-space> |
+
+| parameter | description |
+| --------- | ----------- |
+| `INSTALLED` | Expecting installed chart |
+| `NOTINSTALLED` | Expecting a not installed chart |
+| `release-name` | Name of the release |
+| `name-space` | Expected namespace |
+
# Description of functions in mr_api_functions.sh #
## Function: use_mr_http ##