blob: f360fb7b4a7d999f18f866cca8c009920b8ecd12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
# Smoke use cases
## Goal
The tests are:
- pnf_registrate
- 5gbulkpm
- hv-ves
- vescollector
- cmpv2
- dcaemod
## Usage
The robot scripts have been planned to be launched from the cluster.
The easiest way to run the test consists in creating a kubernetes job.
You can run it as a sandalone dockers but the endpoints must be adapted
to be reachable.
The robot code is under the ONAP testsuite repository
(<https://git.onap.org/testsuite/tree/>).
### Example
An example of job test.yaml can be found hereafter:
```
apiVersion: batch/v1
kind: Job
metadata:
name: integration-onap-5gbulkpm
namespace: onap
spec:
template:
spec:
containers:
- env:
- name: INSTALLER_TYPE
value: oom
- name: DEPLOY_SCENARIO
value: onap-nofeature-noha
- name: NODE_NAME
value: onap_daily_pod4_frankfurt-ONAP-oom
- name: TEST_DB_URL
value: http://testresults.opnfv.org/onap/api/v1/results
- name: BUILD_TAG
value: gitlab_ci-functest-kubespray-baremetal-daily-master-559950989
- name: TAG
value: 5gbulkpm
image: nexus3.onap.org:10003/onap/xtesting-smoke-usecases-robot:latest
imagePullPolicy: Always
name: functest-onap
volumeMounts:
- mountPath: /etc/localtime
name: localtime
readOnly: true
- mountPath: /share/config
name: robot-eteshare
- mountPath: /var/lib/xtesting/results/
name: robot-save-results
restartPolicy: Never
volumes:
- hostPath:
path: /etc/localtime
name: localtime
- configMap:
defaultMode: 493
name: onap-robot-eteshare-configmap
name: robot-eteshare
- hostPath:
path: /dockerdata-nfs/onap/integration/smoke-usecases-robot/5gbulkpm
name: robot-save-results
```
In the example, we want to run the 5gbulkpm test.
### Command
To run the job, just type:
```
kubectl apply -f test.yaml
```
### Output
This job shall create an euphemeral pod.
The results will be available in the mounter volume and shall contains 3 files in
this case:
- xtesting.log
- report.html
- log.html
More generally, it shall contain the xtesting.log + all the artifacts generated by
the test.
***NOTE:***
> It is possible to execute custom/vendor specific PM files validation using 5gbulkpm test cases on demand.
>
> In order to do that there is need to set following environment variables:
>
> - mandatory:
> - BULK_PM_MODE: set to ***custom*** allow to executed custom PM files validation. If this value will be empty or different than custom then default PM file (available in robot image) will be tested.
> - FILE_FORMAT_TYPE: for example ***org.3GPP.32.435#measCollec*** or ***org.3GPP.28.532#measData***
> - FILE_FORMAT_VERSION: for example V10
> - PM_FILE_PATH: location where custom PM file is mounted in POD.
> - EXPECTED_PM_STR: expected string which should be visible in received data from MR topic for example ***perf3gpp_RnNode-Ericsson_pmMeasResult***
> - EXPECTED_EVENT_JSON_PATH: location where received data from MR topic will be saved as a JSON file.
> JSON file name will be ***\<pm_file_name>.json***
> - TAG: ***5gbulkpm***
> - optional:
> - PM_LOG_LEVEL: by default in custom mode all PM details are not logged to robot log files due to fact that test results
> can be send to *<http://testresults.opnfv.org/onap/api/v1/results>*.
> This allows vendor aiming to show that its proprietary component is working fine with the solution under test.
> It allows to set up its own CI chain and report the results regularly to provide the evidence that the tests are still working.
> The available levels: TRACE, DEBUG, INFO, WARN, ERROR and ***NONE*** (default).
> In order to see all logs and not share them to *<http://testresults.opnfv.org/onap/api/v1/results>* please set:
> PM_LOG_LEVEL to TRACE and remove TEST_DB_URL environment variable
>
> ##### Example
>
> An example of job test.yaml can be found hereafter:
>
> ```
> apiVersion: batch/v1
> kind: Job
> metadata:
> name: custom-measurements-onap-5gbulkpm
> namespace: onap
> spec:
> template:
> spec:
> containers:
> - env:
> - name: INSTALLER_TYPE
> value: oom
> - name: DEPLOY_SCENARIO
> value: vendor_specyfic_PM_validation
> - name: NODE_NAME
> value: custom_ONAP_for_vendor_specyfic_PM_validation
> - name: TEST_DB_URL
> value: http://testresults.opnfv.org/onap/api/v1/results
> - name: BUILD_TAG
> value: daily-master-22-01-2021
> - name: TAG
> value: 5gbulkpm
> - name: BULK_PM_MODE
> value: custom
> - name: PM_LOG_LEVEL
> value: NONE
> - name: FILE_FORMAT_TYPE
> value: org.3GPP.28.532#measData
> - name: FILE_FORMAT_VERSION
> value: V1
> - name: PM_FILE_PATH
> value: /var/lib/xtesting/results/<pm_file_name>.xml.gz
> - name: EXPECTED_PM_STR
> value: perf3gpp_RnNode-Ericsson_pmMeasResult
> - name: EXPECTED_EVENT_JSON_PATH
> value: /var/lib/xtesting/results/
> image: nexus3.onap.org:10003/onap/xtesting-smoke-usecases-robot:latest
> imagePullPolicy: Always
> name: functest-onap
> volumeMounts:
> - mountPath: /etc/localtime
> name: localtime
> readOnly: true
> - mountPath: /share/config
> name: robot-eteshare
> - mountPath: /var/lib/xtesting/results/
> name: robot-save-results
> restartPolicy: Never
> volumes:
> - hostPath:
> path: /etc/localtime
> name: localtime
> - configMap:
> defaultMode: 493
> name: onap-robot-eteshare-configmap
> name: robot-eteshare
> - hostPath:
> path: /dockerdata-nfs/onap/robot/logs/custom-measurements
> name: robot-save-results
> ```
|