IMPL: A1 <-> XApp Message Flow Testing
[it/test.git] / ric_robot_suite / docker / nanobot / README
1 #   Copyright (c) 2019 AT&T Intellectual Property.
2 #   Copyright (c) 2019 Nokia.
3 #
4 #   Licensed under the Apache License, Version 2.0 (the "License");
5 #   you may not use this file except in compliance with the License.
6 #   You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #   Unless required by applicable law or agreed to in writing, software
11 #   distributed under the License is distributed on an "AS IS" BASIS,
12 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #   See the License for the specific language governing permissions and
14 #   limitations under the License.
15
16 This dockerfile implements a minimal robot framework container called
17 "nanobot", intended for automated testing or resource-limited
18 environments.
19
20 To build the container, first check the following ENV values at the
21 top of docker/nanobot/Dockerfile to ensure they reflect the RIC
22 platform deployment environment:
23
24 ...
25 ENV RICPLT_NAMESPACE=ricplatform
26 ENV RICPLT_RELEASE_NAME=ric-full
27 ENV RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term"
28 ...
29
30 Then, in the test/ric_robot_suite directory,  build the container:
31
32 $ docker build -f docker/nanobot/Dockerfile -t nanobot:v0.1 .
33
34 To run the container:
35
36 $ docker run --name nanobot -d nanobot:latest
37
38 By default, once started the container simply sleeps forever.
39
40 The container does not include any testsuites; either copy your tests
41 into a running container, or mount a directory of tests when starting
42 the container.  For example:
43
44 $ docker run -v /opt/robot/testsuites:/robot/testsuites --name nanobot -d nanobot:latest
45
46 Once started, the container will simply sleep forever.  To run a test
47 in the container, first copy a K8S credential file to
48 /kubernetes-admin-conf in the container:
49
50 $ docker cp ${KUBECONFIG} nanobot:/kubernetes-admin-conf
51
52 ... then run the test:
53
54 $ docker exec nanobot robot /robot/testsuites/ricdeployment.robot
55 ==============================================================================
56 Ricdeployment :: Tests for the existence and functionality of RIC components
57 ==============================================================================
58 Deployments                                                           .ricplatform/ric-full-appmgr is available
59 ricplatform/ric-full-rtmgr is available
60 ricplatform/ric-full-dbaas is available
61 ricplatform/ric-full-e2mgr is available
62 ricplatform/ric-full-e2term is available
63 Deployments                                                           | PASS |
64 ------------------------------------------------------------------------------
65 Ricdeployment :: Tests for the existence and functionality of RIC ... | PASS |
66 1 critical test, 1 passed, 0 failed
67 1 test total, 1 passed, 0 failed
68 ==============================================================================
69 Output:  /output.xml
70 Log:     /log.html
71 Report:  /report.html
72
73 A Helm chart for the container can be found in
74 ric_robot_suite/helm/nanobot.  See ric_robot_suite/helm/nanobot/README
75 for more information on the chart.