add log level change test
[integration/csit.git] / tests / dcaegen2 / prh-testcases / prh_tests.robot
1 *** Settings ***
2 Documentation     Integration tests for PRH.
3 ...               PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
4 Suite Setup       Run keywords   Create Headers  AND  Create sessions
5 Test Teardown     Reset Simulators
6 Test Timeout      2 minutes
7
8 Library           resources/PrhLibrary.py
9 Resource          resources/prh_library.robot
10 Resource          ../../common.robot
11
12 *** Variables ***
13 ${TEST_CASES_DIR}    %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
14
15 ${DMAAP_SIMULATOR_SETUP_URL}    http://${DMAAP_SIMULATOR_SETUP}
16 ${AAI_SIMULATOR_SETUP_URL}    http://${AAI_SIMULATOR_SETUP}
17 ${CONSUL_SETUP_URL}    http://${CONSUL_SETUP}
18 ${PRH_SETUP_URL}  http://${PRH_SETUP}
19 ${TRACE_LOG_LEVEL_CONF}    {"configuredLevel":"TRACE","effectiveLevel":"TRACE"}
20 ${WARN_LOG_LEVEL_CONF}    {"configuredLevel":"WARN","effectiveLevel":"WARN"}
21
22 *** Test Cases ***
23 BBS case event - attachment point
24     [Documentation]    PRH get from DMaaP valid event with valid attachment point
25     [Tags]    PRH    Valid event    Attachment point
26     [Template]    Verify PNF ready sent and logical link created
27     ${TEST_CASES_DIR}/ves-event-with-attachment-point
28
29 Simple registration event
30     [Documentation]    PRH get from DMaaP valid event without valid attachment point
31     [Tags]    PRH    Valid event
32     [Template]    Verify PNF ready sent
33     ${TEST_CASES_DIR}/ves-event-without-additional-fields
34     ${TEST_CASES_DIR}/ves-event-with-empty-additional-fields
35     ${TEST_CASES_DIR}/ves-event-with-empty-attachment-point
36
37 Should not sent PNF ready when DMaaP event is invalid
38     [Documentation]    PRH get from DMaaP event with missing required field
39     [Tags]    PRH    Invalid event
40     [Template]    Verify event with missing required field is logged
41     ${TEST_CASES_DIR}/ves-event-missing-field
42
43 Should not sent PNF ready when DMaaP event is not JSON array
44     [Documentation]    Event from DMaaP is not JSON array
45     [Tags]    PRH    Invalid event
46     Verify incorrect JSON event is logged    ${TEST_CASES_DIR}/ves-event-not-array
47
48 Should not sent PNF ready when AAI record doesn't exist
49     [Documentation]    PRH get from DMaaP valid event but given PNF doesn't exists in AAI
50     [Tags]    PRH    Missing AAI record
51     Verify missing AAI record is logged    ${TEST_CASES_DIR}/aai-missing-entry
52
53 Should not sent PNF ready when AAI is not responding
54     [Documentation]    PRH get from DMaaP valid event but AAI is not responding
55     [Tags]    PRH    AAI not responding
56     Verify AAI not responding is logged    ${TEST_CASES_DIR}/aai-not-responding
57
58 BBS case event - Re-registration
59     [Documentation]    After regitered PNF, PRH reads another one PRH event with registration event
60     [Tags]    PRH    Valid event    Re registraiton
61     [Template]    Verify PNF re registration
62     ${TEST_CASES_DIR}/re-registration
63
64 PRH logging level change
65     [Documentation]    PRH logging level change from WARN to TRACE
66     [Tags]    PRH    logging level
67     Verify change logging level