Update PRH tests to use file based conifg
[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   AND    Set default PRH config
5 Test Teardown     Reset Simulators
6 Test Timeout      2 minutes
7
8 Resource          resources/prh_sessions.robot
9 Resource          resources/prh_library.robot
10 Resource          resources/prh_config_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-missing-IP-addresses
28     ${TEST_CASES_DIR}/ves-event-with-only-IP-addresses
29     ${TEST_CASES_DIR}/ves-event-with-empty-additional-fields
30     ${TEST_CASES_DIR}/ves-event-with-empty-attachment-point
31
32 Should not send PNF ready when DMaaP event has missing required field
33     [Documentation]    PRH get from DMaaP event with missing required field
34     [Tags]    PRH    Invalid event
35     [Template]    Verify event with missing required field is logged
36     ${TEST_CASES_DIR}/ves-event-missing-field
37
38 Should not send PNF ready when DMaaP event is not JSON array
39     [Documentation]    Event from DMaaP is not an array of JSON objects
40     [Tags]    PRH    Invalid event
41     Verify incorrect JSON event is logged    ${TEST_CASES_DIR}/ves-event-not-a-json-object
42
43 Should not send PNF ready when AAI record doesn't exist
44     [Documentation]    PRH get from DMaaP valid event but given PNF doesn't exists in AAI
45     [Tags]    PRH    Missing AAI record
46     Verify missing AAI record is logged    ${TEST_CASES_DIR}/aai-missing-entry
47
48 Should not send PNF ready when AAI is not responding
49     [Documentation]    PRH get from DMaaP valid event but AAI is not responding
50     [Tags]    PRH    AAI not responding
51     Verify AAI not responding is logged    ${TEST_CASES_DIR}/aai-not-responding
52
53 Should send PNF ready when logical link exists and replace it in AAI
54     [Documentation]  PRH gets event from DMaaP with an attachment point, PNF is related to a logical link in AAI
55     [Tags]  PRH    Attachment point
56     [Template]  Verify PNF ready sent and old logical link replaced in AAI
57     ${TEST_CASES_DIR}/pnf-with-existing-logical-link
58     ${TEST_CASES_DIR}/pnf-with-different-logical-link
59
60 BBS case event - Re-registration
61     [Documentation]    After registered PNF, PRH reads another one PRH event with registration event
62     [Tags]    PRH    Valid event    Re registraiton
63     [Template]    Verify PNF re registration
64     ${TEST_CASES_DIR}/re-registration
65
66 Should send PNF ready when the associated service instance is non-Active
67     [Documentation]  PNF has a non active service instance, should send PNF_READY event
68     [Tags]  PRH Service instance non active
69     [Template]  Verify PNF ready sent when service instance non active
70     ${TEST_CASES_DIR}/service-instance-non-active
71
72 PRH logging level change
73     [Documentation]    ad-hoc PRH logging level change using rest endpoint
74     [Tags]    PRH    logging level
75     Verify change logging level