Merge "Add test for logging level change in PRH based on configuration from CBS"
[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_sessions.robot
10 Resource          resources/prh_library.robot
11
12 *** Variables ***
13 ${TEST_CASES_DIR}    %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
14
15 *** Test Cases ***
16 BBS case event - attachment point
17     [Documentation]    PRH get from DMaaP valid event with valid attachment point
18     [Tags]    PRH    Valid event    Attachment point
19     [Template]    Verify PNF ready sent and logical link created
20     ${TEST_CASES_DIR}/ves-event-with-attachment-point
21
22 Simple registration event
23     [Documentation]    PRH get from DMaaP valid event without valid attachment point
24     [Tags]    PRH    Valid event
25     [Template]    Verify PNF ready sent
26     ${TEST_CASES_DIR}/ves-event-without-additional-fields
27     ${TEST_CASES_DIR}/ves-event-with-empty-additional-fields
28     ${TEST_CASES_DIR}/ves-event-with-empty-attachment-point
29
30 Should not sent PNF ready when DMaaP event is invalid
31     [Documentation]    PRH get from DMaaP event with missing required field
32     [Tags]    PRH    Invalid event
33     [Template]    Verify event with missing required field is logged
34     ${TEST_CASES_DIR}/ves-event-missing-field
35
36 Should not sent PNF ready when DMaaP event is not JSON array
37     [Documentation]    Event from DMaaP is not JSON array
38     [Tags]    PRH    Invalid event
39     Verify incorrect JSON event is logged    ${TEST_CASES_DIR}/ves-event-not-array
40
41 Should not sent PNF ready when AAI record doesn't exist
42     [Documentation]    PRH get from DMaaP valid event but given PNF doesn't exists in AAI
43     [Tags]    PRH    Missing AAI record
44     Verify missing AAI record is logged    ${TEST_CASES_DIR}/aai-missing-entry
45
46 Should not sent PNF ready when AAI is not responding
47     [Documentation]    PRH get from DMaaP valid event but AAI is not responding
48     [Tags]    PRH    AAI not responding
49     Verify AAI not responding is logged    ${TEST_CASES_DIR}/aai-not-responding
50
51 BBS case event - Re-registration
52     [Documentation]    After regitered PNF, PRH reads another one PRH event with registration event
53     [Tags]    PRH    Valid event    Re registraiton
54     [Template]    Verify PNF re registration
55     ${TEST_CASES_DIR}/re-registration
56
57 PRH logging level change
58     [Documentation]    ad-hoc PRH logging level change using rest endpoint
59     [Tags]    PRH    logging level
60     Verify change logging level