670ea5e773599ca95165a5d340ac0306b42087d8
[nonrtric.git] / test / auto-test / FTC100.sh
1 #!/bin/bash
2
3 #  ============LICENSE_START===============================================
4 #  Copyright (C) 2020 Nordix Foundation. All rights reserved.
5 #  ========================================================================
6 #  Licensed under the Apache License, Version 2.0 (the "License");
7 #  you may not use this file except in compliance with the License.
8 #  You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #  Unless required by applicable law or agreed to in writing, software
13 #  distributed under the License is distributed on an "AS IS" BASIS,
14 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #  See the License for the specific language governing permissions and
16 #  limitations under the License.
17 #  ============LICENSE_END=================================================
18 #
19
20
21 TC_ONELINE_DESCR="Full agent API walkthrough using agent REST/DMAAP and with/without SDNC A1 Controller"
22
23 #App names to include in the test when running docker, space separated list
24 DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR PA RICSIM SDNC NGW KUBEPROXY"
25
26 #App names to include in the test when running kubernetes, space separated list
27 KUBE_INCLUDED_IMAGES="CP CR MR PA RICSIM SDNC KUBEPROXY NGW"
28 #Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
29 KUBE_PRESTARTED_IMAGES=""
30
31 #Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
32 #the image is not configured in the supplied env_file
33 #Used for images not applicable to all supported profile
34 CONDITIONALLY_IGNORED_IMAGES="NGW"
35
36 #Supported test environment profiles
37 SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
38 #Supported run modes
39 SUPPORTED_RUNMODES="DOCKER KUBE"
40
41 . ../common/testcase_common.sh $@
42
43 setup_testenvironment
44
45 #### TEST BEGIN ####
46
47 generate_policy_uuid
48
49 # Tested variants of REST/DMAAP/SDNC config
50 TESTED_VARIANTS="REST   DMAAP   REST+SDNC   DMAAP+SDNC"
51
52 #Test agent and simulator protocol versions (others are http only)
53 TESTED_PROTOCOLS="HTTP HTTPS"
54
55 for __httpx in $TESTED_PROTOCOLS ; do
56     for interface in $TESTED_VARIANTS ; do
57
58         echo "#####################################################################"
59         echo "#####################################################################"
60         echo "### Testing agent: $interface using $__httpx"
61         echo "#####################################################################"
62         echo "#####################################################################"
63
64         # Clean container and start all needed containers #
65         clean_environment
66
67         start_kube_proxy
68
69         if [ $__httpx == "HTTPS" ]; then
70             use_cr_https
71             use_agent_rest_https
72         else
73             use_agent_rest_http
74             use_cr_http
75         fi
76
77         start_policy_agent NORPOXY $SIM_GROUP/$POLICY_AGENT_COMPOSE_DIR/$POLICY_AGENT_CONFIG_FILE
78
79         set_agent_debug
80
81         # Create service to be able to receive events when rics becomes available
82         # Must use rest towards the agent since dmaap is not configured yet
83         api_put_service 201 "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"
84
85
86         if [ $__httpx == "HTTPS" ]; then
87             use_simulator_https
88             use_mr_https
89             if [[ $interface = *"SDNC"* ]]; then
90                 use_sdnc_https
91             fi
92             if [[ $interface = *"DMAAP"* ]]; then
93                 use_agent_dmaap_https
94             else
95                 use_agent_rest_https
96             fi
97         else
98             use_simulator_http
99             use_mr_http
100             if [[ $interface = *"SDNC"* ]]; then
101                 use_sdnc_http
102             fi
103             if [[ $interface = *"DMAAP"* ]]; then
104                 use_agent_dmaap_http
105             else
106                 use_agent_rest_http
107             fi
108         fi
109
110         start_ric_simulators ricsim_g1 1  OSC_2.1.0
111         start_ric_simulators ricsim_g2 1  STD_1.1.3
112         if [ "$PMS_VERSION" == "V2" ]; then
113             start_ric_simulators ricsim_g3 1  STD_2.0.0
114         fi
115
116         start_mr
117
118         start_cr 1
119
120         start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
121
122         if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
123             start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
124         fi
125
126         if [ $RUNMODE == "DOCKER" ]; then
127             start_consul_cbs
128         fi
129
130         if [[ $interface = *"SDNC"* ]]; then
131             start_sdnc
132             prepare_consul_config      SDNC    ".consul_config.json"
133         else
134             prepare_consul_config      NOSDNC  ".consul_config.json"
135         fi
136
137         if [ $RUNMODE == "KUBE" ]; then
138             agent_load_config                       ".consul_config.json"
139         else
140             consul_config_app                      ".consul_config.json"
141         fi
142
143         sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
144         sim_put_policy_type 201 ricsim_g1_1 2 testdata/OSC/sim_2.json
145
146         if [ "$PMS_VERSION" == "V2" ]; then
147             sim_put_policy_type 201 ricsim_g3_1 STD_QOS_0_2_0 testdata/STD2/sim_qos.json
148             sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
149
150             api_equal json:rics 3 300
151
152             api_equal json:policy-types 5 120
153
154             api_equal json:policies 0
155
156             api_equal json:policy-instances 0
157         else
158             api_equal json:rics 2 300
159
160             api_equal json:policy_schemas 3 120
161
162             api_equal json:policy_types 3
163
164             api_equal json:policies 0
165
166             api_equal json:policy_ids 0
167         fi
168
169         if [ "$PMS_VERSION" == "V2" ]; then
170             cr_equal 0 received_callbacks 3 120
171             cr_api_check_all_sync_events 200 0 ric-registration ricsim_g1_1 ricsim_g2_1 ricsim_g3_1
172         fi
173         mr_equal requests_submitted 0
174
175
176         echo "############################################"
177         echo "############## Health check ################"
178         echo "############################################"
179
180         api_get_status 200
181
182         echo "############################################"
183         echo "##### Service registry and supervision #####"
184         echo "############################################"
185
186         api_get_services 404 "service1"
187
188         api_put_service 201 "service1" 1000 "$CR_SERVICE_APP_PATH_0/1"
189
190         api_put_service 200 "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
191
192
193         api_put_service 400 "service2" -1 "$CR_SERVICE_APP_PATH_0/2"
194
195         api_put_service 400 "service2" "wrong" "$CR_SERVICE_APP_PATH_0/2"
196
197         api_put_service 400 "service2" 100 "/test"
198
199         api_put_service 400 "service2" 100 "test-path"
200
201         api_put_service 201 "service2" 300 "ftp://localhost:80/test"
202
203         api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
204
205         api_get_service_ids 200 "service1" "service2" "ric-registration"
206
207
208         api_put_service 201 "service3" 5000 "$CR_SERVICE_APP_PATH_0/3"
209
210
211         api_get_service_ids 200 "service1" "service2" "service3" "ric-registration"
212
213
214         api_get_services 200 "service1" "service1" 2000 "$CR_SERVICE_APP_PATH_0/1"
215
216         api_get_services 200 NOSERVICE "service1" 2000 "$CR_SERVICE_APP_PATH_0/1" "service2" 300 "ftp://localhost:80/test" "service3" 5000 "$CR_SERVICE_APP_PATH_0/3"  "ric-registration" 0 "$CR_SERVICE_APP_PATH_0/ric-registration"
217
218         api_get_services 200
219
220         deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
221         #The below should work, keept here until fixed or other decision made
222         #api_put_services_keepalive 201 "service1"
223         #Using the below until decision
224         api_put_services_keepalive 200 "service1"
225
226         deviation "TR2 - Keep alive shall return 200/201 according to doc, only 200 works - test combo $interface and $__httpx"
227         #The below should work, keept here until fixed or other decision made
228         #api_put_services_keepalive 201 "service3"
229         #Using the below until decision
230         api_put_services_keepalive 200 "service3"
231
232         api_put_services_keepalive 200 "service1"
233
234         api_put_services_keepalive 200 "service3"
235
236         api_put_services_keepalive 404 "service5"
237
238         api_get_service_ids 200 "service1" "service2" "service3"  "ric-registration"
239
240         api_delete_services 204 "service1"
241
242         api_get_service_ids 200 "service2" "service3" "ric-registration"
243
244
245         api_put_service 201 "service1" 50 "$CR_SERVICE_APP_PATH_0/1"
246
247         api_get_service_ids 200 "service1" "service2" "service3"  "ric-registration"
248
249
250         api_delete_services 204 "service1"
251         api_delete_services 204 "service3"
252
253         api_equal json:services 2
254
255         api_delete_services 204 "service2"
256
257         api_equal json:services 1
258
259
260         echo "############################################"
261         echo "############## RIC Repository ##############"
262         echo "############################################"
263
264         if [ "$PMS_VERSION" == "V2" ]; then
265             api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE  ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE"
266         else
267             api_get_rics 200 NOTYPE "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE  ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
268         fi
269         api_get_rics 200 1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
270
271         api_get_rics 404 47
272
273         api_get_rics 404 "test"
274
275         if [ "$PMS_VERSION" == "V2" ]; then
276             api_get_ric 200 me1_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
277
278             api_get_ric 200 me2_ricsim_g1_1 NORIC "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
279
280             api_get_ric 200 me1_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
281
282             api_get_ric 200 me2_ricsim_g2_1 NORIC "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
283
284             api_get_ric 200 me1_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE"
285
286             api_get_ric 200 me2_ricsim_g3_1 NORIC "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE"
287
288             api_get_ric 200 NOME      ricsim_g1_1 "ricsim_g1_1:me1_ricsim_g1_1,me2_ricsim_g1_1:1,2:AVAILABLE"
289
290             api_get_ric 200 NOME      ricsim_g2_1 "ricsim_g2_1:me1_ricsim_g2_1,me2_ricsim_g2_1:EMPTYTYPE:AVAILABLE"
291
292             api_get_ric 200 NOME      ricsim_g3_1 "ricsim_g3_1:me1_ricsim_g3_1,me2_ricsim_g3_1:STD_QOS_0_2_0,STD_QOS2_0.1.0:AVAILABLE"
293
294             api_get_ric 404 NOME test1
295
296             api_get_ric 404 test NORIC
297
298             api_get_ric 400 me1_ricsim_g1_1 ricsim_g1_1
299
300             api_get_ric 400 me1_ricsim_g1_1 TESTRIC
301
302             api_get_ric 400 TESTME ricsim_g1_1
303
304         else
305             api_get_ric 200 me1_ricsim_g1_1 ricsim_g1_1
306
307             api_get_ric 200 me2_ricsim_g1_1 ricsim_g1_1
308
309             api_get_ric 200 me1_ricsim_g2_1 ricsim_g2_1
310
311             api_get_ric 200 me2_ricsim_g2_1 ricsim_g2_1
312
313             api_get_ric 404 test
314         fi
315
316         echo "############################################"
317         echo "########### A1 Policy Management ###########"
318         echo "############################################"
319
320         if [ "$PMS_VERSION" == "V2" ]; then
321             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
322             #Behaviour accepted for now
323             api_get_policy_type 200 1 testdata/OSC/1-agent-modified.json
324             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
325             #Behaviour accepted for now
326             api_get_policy_type 200 2 testdata/OSC/2-agent-modified.json
327             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
328             #Behaviour accepted for now
329             api_get_policy_type 200 STD_QOS_0_2_0 testdata/STD2/qos-agent-modified.json
330             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
331             #Behaviour accepted for now
332             api_get_policy_type 200 STD_QOS2_0.1.0 testdata/STD2/qos2-agent-modified.json
333
334             api_get_policy_type 404 3
335         else
336             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
337             #Behaviour accepted for now
338             api_get_policy_schema 200 1 testdata/OSC/1-agent-modified.json
339             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
340             #Behaviour accepted for now
341             api_get_policy_schema 200 2 testdata/OSC/2-agent-modified.json
342
343             api_get_policy_schema 404 3
344         fi
345
346         if [ "$PMS_VERSION" == "V2" ]; then
347             api_get_policy_schemas 404
348         else
349             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
350             #Behaviour accepted for now
351             api_get_policy_schemas 200 NORIC testdata/OSC/1-agent-modified.json testdata/OSC/2-agent-modified.json NOFILE
352             deviation "TR9 - agent modify the type with type id - test combo $interface and $__httpx"
353             #Behaviour accepted for now
354             api_get_policy_schemas 200 ricsim_g1_1 testdata/OSC/1-agent-modified.json testdata/OSC/2-agent-modified.json
355
356             api_get_policy_schemas 200 ricsim_g2_1 NOFILE
357
358             api_get_policy_schemas 404 test
359         fi
360
361
362         if [ "$PMS_VERSION" == "V2" ]; then
363             api_get_policy_types 200 NORIC 1 2 EMPTY STD_QOS_0_2_0 STD_QOS2_0.1.0
364         else
365             api_get_policy_types 200 NORIC 1 2 EMPTY
366         fi
367
368         api_get_policy_types 200 ricsim_g1_1 1 2
369
370         api_get_policy_types 200 ricsim_g2_1 EMPTY
371
372         if [ "$PMS_VERSION" == "V2" ]; then
373             api_get_policy_types 200 ricsim_g3_1 STD_QOS_0_2_0 STD_QOS2_0.1.0
374         fi
375
376         api_get_policy_types 404 dummy-ric
377
378
379
380         api_put_service 201 "service10" 3600 "$CR_SERVICE_APP_PATH_0/1"
381
382         if [ "$PMS_VERSION" == "V2" ]; then
383             notificationurl=$CR_SERVICE_APP_PATH_0"/test"
384         else
385             notificationurl=""
386         fi
387         deviation "TR10 - agent allows policy creation on unregistered service (orig problem) - test combo $interface and $__httpx"
388         #Kept until decison
389         #api_put_policy 400 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT testdata/OSC/pi1_template.json
390         #Allow 201 for now
391         api_put_policy 201 "unregistered-service" ricsim_g1_1 1 2000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
392
393         api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
394         api_put_policy 200 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
395
396         api_put_policy 200 "service10" ricsim_g1_1 1 5000 true $notificationurl testdata/OSC/pi1_template.json
397         api_put_policy 200 "service10" ricsim_g1_1 1 5000 false $notificationurl testdata/OSC/pi1_template.json
398
399         api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
400         api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
401
402         api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 true $notificationurl testdata/STD/pi1_template.json
403         api_put_policy 200 "service10" ricsim_g2_1 NOTYPE 5100 false $notificationurl testdata/STD/pi1_template.json
404
405         if [ "$PMS_VERSION" == "V2" ]; then
406             api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
407             api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
408
409             api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 true $notificationurl testdata/STD2/pi_qos2_template.json
410             api_put_policy 200 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 false $notificationurl testdata/STD2/pi_qos2_template.json
411         fi
412
413         VAL='NOT IN EFFECT'
414         api_get_policy_status 200 5000 OSC "$VAL" "false"
415         api_get_policy_status 200 5100 STD "UNDEFINED"
416         if [ "$PMS_VERSION" == "V2" ]; then
417             api_get_policy_status 200 5200 STD2 EMPTY EMPTY
418         fi
419
420
421         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
422         #kept until decision
423         #api_equal json:policies 2
424         #Allow 3 for now
425         if [ "$PMS_VERSION" == "V2" ]; then
426             api_equal json:policies 4
427         else
428             api_equal json:policies 3
429         fi
430
431         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
432         #kept until decision
433         #api_equal json:policy_ids 2
434         #Allow 3 for now
435         if [ "$PMS_VERSION" == "V2" ]; then
436             api_equal json:policy-instances 4
437         else
438             api_equal json:policy_ids 3
439         fi
440
441         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
442         #kept until decision
443         #api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100
444         #Allow policy create with unregistered service for now
445         if [ "$PMS_VERSION" == "V2" ]; then
446             api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000 5200
447         else
448             api_get_policy_ids 200 NORIC NOSERVICE NOTYPE 5000 5100 2000
449         fi
450
451         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
452         #kept until decision
453         #api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000
454         #Allow policy create with unregistered service for now
455         if [ "$PMS_VERSION" == "V2" ]; then
456             api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000
457
458             api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100
459
460             api_get_policy_ids 200 ricsim_g3_1 NOSERVICE NOTYPE 5200
461
462             api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100 5200
463         else
464             api_get_policy_ids 200 ricsim_g1_1 NOSERVICE NOTYPE 5000 2000
465
466             api_get_policy_ids 200 ricsim_g2_1 NOSERVICE NOTYPE 5100
467
468
469             api_get_policy_ids 200 NORIC "service10" NOTYPE 5000 5100
470         fi
471
472         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
473         #kept until decision
474         #api_get_policy_ids 200 NORIC NOSERVICE 1 5000
475         #Allow policy create with unregistered service for now
476
477         api_get_policy_ids 200 NORIC NOSERVICE 1 5000 2000
478
479         api_get_policy_ids 200 NORIC NOSERVICE 2 NOID
480
481         if [ "$PMS_VERSION" == "V2" ]; then
482             api_get_policy_ids 200 NORIC NOSERVICE STD_QOS2_0.1.0 5200
483         fi
484
485         api_get_policy_ids 200 ricsim_g2_1 NOSERVICE 1 NOID
486
487         if [ "$PMS_VERSION" == "V2" ]; then
488             api_get_policy 200 5000 testdata/OSC/pi1_template.json "service10" ricsim_g1_1 1 false $notificationurl
489
490             api_get_policy 200 5100 testdata/STD/pi1_template.json "service10" ricsim_g2_1 NOTYPE false $notificationurl
491
492             api_get_policy 200 5200 testdata/STD2/pi_qos2_template.json "service10" ricsim_g3_1 STD_QOS2_0.1.0 false $notificationurl
493
494             api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 false $notificationurl testdata/OSC/pi1_template.json
495         else
496             api_get_policy 200 5000 testdata/OSC/pi1_template.json
497
498             api_get_policy 200 5100 testdata/STD/pi1_template.json
499
500             api_get_policies 200 ricsim_g1_1 "service10" 1 5000 ricsim_g1_1 "service10" 1 testdata/OSC/pi1_template.json
501         fi
502
503         deviation "TR10 - agent allows policy creation on unregistered service (side effect of orig. problem)- test combo $interface and $__httpx"
504         #kept until decision
505         #api_delete_policy 404 2000
506         #Allow policy create with unregistered service for now
507         api_delete_policy 204 2000
508
509         api_delete_policy 404 1500
510
511         api_delete_policy 204 5000
512
513         if [ "$PMS_VERSION" == "V2" ]; then
514
515             api_delete_policy 204 5200
516         fi
517
518         api_equal json:policies 1
519
520
521         if [ "$PMS_VERSION" == "V2" ]; then
522             api_equal json:policy-instances 1
523         else
524             api_equal json:policy_ids 1
525         fi
526
527         api_delete_policy 204 5100
528
529         api_equal json:policies 0
530
531         if [ "$PMS_VERSION" == "V2" ]; then
532             api_equal json:policy-instances 0
533         else
534             api_equal json:policy_ids 0
535         fi
536
537         if [ "$PMS_VERSION" == "V2" ]; then
538             cr_equal 0 received_callbacks 3
539         fi
540
541         if [[ $interface = *"DMAAP"* ]]; then
542             mr_greater requests_submitted 0
543             VAL=$(mr_read requests_submitted)
544             mr_equal requests_fetched $VAL
545             mr_equal responses_submitted $VAL
546             mr_equal responses_fetched $VAL
547             mr_equal current_requests 0
548             mr_equal current_responses 0
549         else
550             mr_equal requests_submitted 0
551         fi
552
553         if [[ $interface = *"SDNC"* ]]; then
554             sim_contains_str ricsim_g1_1 remote_hosts $SDNC_APP_NAME
555             sim_contains_str ricsim_g2_1 remote_hosts $SDNC_APP_NAME
556             if [ "$PMS_VERSION" == "V2" ]; then
557                 sim_contains_str ricsim_g3_1 remote_hosts $SDNC_APP_NAME
558             fi
559         else
560             sim_contains_str ricsim_g1_1 remote_hosts $POLICY_AGENT_APP_NAME
561             sim_contains_str ricsim_g2_1 remote_hosts $POLICY_AGENT_APP_NAME
562             if [ "$PMS_VERSION" == "V2" ]; then
563                 sim_contains_str ricsim_g3_1 remote_hosts $POLICY_AGENT_APP_NAME
564             fi
565         fi
566
567         check_policy_agent_logs
568
569         if [[ $interface = *"SDNC"* ]]; then
570             check_sdnc_logs
571         fi
572
573         store_logs          "${__httpx}__${interface}"
574
575     done
576
577 done
578
579 #### TEST COMPLETE ####
580
581
582 print_result
583
584 auto_clean_environment