blob: be24a87a57ac8fb0def5d4585ca574e00c3ec6eb [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
2Library DcaeAppSimulatorLibrary
3
4Resource resources/common-keywords.robot
5
6Suite Setup Client Authorization Suite Setup
7Suite Teardown VES-HV Collector Suite Teardown
8Test Teardown VES-HV Collector Test Shutdown
9
10*** Keywords ***
11Client Authorization Suite Setup
12 Log Started Suite: VES-HV Client Authorization
13 ${XNF_PORTS_LIST}= Create List 7000
14 ${XNF_WITH_INVALID_CERTIFICATES}= Configure xNF Simulators ${XNF_PORTS_LIST}
15 ... should_use_valid_certs=${false}
16 Set Suite Variable ${XNF_WITH_INVALID_CERTIFICATES}
17 ${XNF_PORTS_LIST}= Create List 7001
18 ${XNF_WITHOUT_SSL}= Configure xNF Simulators ${XNF_PORTS_LIST}
19 ... should_disable_ssl=${true}
20 Set Suite Variable ${XNF_WITHOUT_SSL}
21 ${XNF_PORTS_LIST}= Create List 7002
22 ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES}= Configure xNF Simulators ${XNF_PORTS_LIST}
23 ... should_disable_ssl=${true}
24 ... should_connect_to_unencrypted_hv_ves=${true}
25 Set Suite Variable ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES}
26 Log Suite setup finished
27
28*** Test Cases ***
29Authorization
30 [Documentation] VES-HV Collector should not authorize XNF with invalid certificate and not route any message
31 ... to topics
32
33 Send Messages From xNF Simulators ${XNF_WITH_INVALID_CERTIFICATES} ${XNF_VALID_MESSAGES_REQUEST}
34
35 Wait until keyword succeeds 60 sec 5 sec
36 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0}
37
38Unencrypted connection from client
39 [Documentation] VES-HV Collector should not authorize XNF trying to connect through unencrypted connection
40
41 Send Messages From xNF Simulators ${XNF_WITHOUT_SSL} ${XNF_VALID_MESSAGES_REQUEST}
42
43 Wait until keyword succeeds 60 sec 5 sec
44 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_0}
45
46Unencrypted connection on both ends
47 [Documentation] When run without SSL turned on, VES-HV Collector should route all valid messages
48 ... from xNF trying to connect through unencrypted connection
49
50 Send Messages From xNF Simulators ${XNF_WITHOUT_SSL_CONNECTING_TO_UNENCRYPTED_HV_VES} ${XNF_VALID_MESSAGES_REQUEST}
51
52 Wait until keyword succeeds 60 sec 5 sec
53 ... Assert Dcae App Consumed ${DCAE_APP_API_MESSAGES_COUNT_URL} ${AMOUNT_5000}
54
55
56*** Variables ***
Gary Wu13111e92018-09-27 11:31:33 -070057${VES_HV_SCENARIOS} %{WORKSPACE}/tests/dcaegen2-collectors-hv-ves/testcases/resources/scenarios
Gary Wu9abb61c2018-09-27 10:38:50 -070058
59${XNF_VALID_MESSAGES_REQUEST} ${VES_HV_SCENARIOS}/authorization/xnf-valid-messages-request.json
60
61${AMOUNT_0} 0
62${AMOUNT_5000} 5000