junit5 dependencies
[policy/parent.git] / docs / development / devtools / smoke / distribution-smoke.rst
1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5 .. _policy-distribution-smoke-testing-label:
6
7 Policy Distribution Smoke Test
8 ################################
9
10 The policy-distribution smoke testing is executed against a custom ONAP docker or Kubernetes installation as defined in the docker compose file in "policy/docker/csit/".
11 The policy-distribution configuration file is located in "docker/csit/config/distribution/".
12 This test verifies the execution of the REST API's exposed by the component to make sure the CSAR Decoding and Forwarding works as expected.
13 Also, the deployment of the policy is checked automatically. An event is then sent to the deployed policy, and thus, its correct operation is verified.
14
15 There are 2 alternative ways to carry out the tests. In Docker and in Kubernetes
16
17 Docker Setup
18 ************
19 In policy/docker/csit/
20
21 More detailed setup for docker CSIT is here
22
23 `Policy CSIT Test Install Docker <https://docs.onap.org/projects/onap-policy-parent/en/latest/development/devtools/testing/csit.html>`_
24
25 .. code-block:: bash
26
27     ./run-project-csit.sh distribution
28
29 This script will do the following:
30
31 - Deploys all required components - including api, pap and distribution
32 - Runs distributions CSIT tests. These tests:
33
34     - Take a policy from a CSAR file in distribution.
35     - Distribution sends and deploys it in API and PAP.
36     - Send an event to the deployed policy - if the policy is NOT deployed successfully, this will FAIL with a 404.
37
38 - Takes down all the components.
39 - Saves the results in a .html file in the csit/archives/distribution directory
40 - Saves the docker compose logs in the same directory
41
42 K8S Setup
43 *********
44 In policy/docker/csit/
45
46 More detailed setup for K8S CSIT is here
47
48 `Policy CSIT Test Install Kubernetes <https://docs.onap.org/projects/onap-policy-parent/en/latest/development/devtools/testing/csit.html>`_
49
50 .. code-block:: bash
51
52     ./run-k8s-csit.sh install distribution
53
54 This script will do the following:
55
56 - Installs microk8s and configures it.
57 - Deploys all required components - including api, pap and distribution as helm charts
58 - Waits for all the charts to come up
59 - Runs distributions CSIT tests. These tests:
60
61     - Take a policy from a CSAR file in distribution.
62     - Distribution sends and deploys it in API and PAP.
63     - Sends an event to the deployed policy - if the policy is NOT deployed successfully, this will FAIL with a 404.
64
65 - Saves the results in a .html file in the csit/archives/distribution directory
66 - The pods are not automatically taken down.
67
68 To uninstall policy helm deployment and/or the microk8s cluster, use `run-k8s-csit.sh`
69
70 .. code-block:: bash
71
72   # to uninstall deployment
73   ./run-k8s-csit.sh uninstall
74
75   # to remove cluster
76   ./run-k8s-csit.sh clean
77
78 End of document