Update PRH tests to use file based conifg
[integration/csit.git] / tests / dcaegen2 / prh-testcases / prh_tests.robot
index 43d3188..8b7561a 100644 (file)
@@ -1,25 +1,17 @@
 *** Settings ***
 Documentation     Integration tests for PRH.
 ...               PRH receive events from DMaaP and produce or not PNF_READY notification depends on required fields in received event.
-Suite Setup       Run keywords   Create Headers  AND  Create sessions
+Suite Setup       Run keywords   Create Headers  AND  Create sessions   AND    Set default PRH config
 Test Teardown     Reset Simulators
 Test Timeout      2 minutes
 
-Library           resources/PrhLibrary.py
 Resource          resources/prh_sessions.robot
 Resource          resources/prh_library.robot
-Resource          resources/prh_config_tests.robot
+Resource          resources/prh_config_library.robot
 
 *** Variables ***
 ${TEST_CASES_DIR}    %{WORKSPACE}/tests/dcaegen2/prh-testcases/assets
 
-${DMAAP_SIMULATOR_SETUP_URL}    http://${DMAAP_SIMULATOR_SETUP}
-${AAI_SIMULATOR_SETUP_URL}    http://${AAI_SIMULATOR_SETUP}
-${CONSUL_SETUP_URL}    http://${CONSUL_SETUP}
-${PRH_SETUP_URL}  http://${PRH_SETUP}
-${TRACE_LOG_LEVEL_CONF}    {"configuredLevel":"TRACE","effectiveLevel":"TRACE"}
-${WARN_LOG_LEVEL_CONF}    {"configuredLevel":"WARN","effectiveLevel":"WARN"}
-
 *** Test Cases ***
 BBS case event - attachment point
     [Documentation]    PRH get from DMaaP valid event with valid attachment point
@@ -32,47 +24,52 @@ Simple registration event
     [Tags]    PRH    Valid event
     [Template]    Verify PNF ready sent
     ${TEST_CASES_DIR}/ves-event-without-additional-fields
+    ${TEST_CASES_DIR}/ves-event-with-missing-IP-addresses
+    ${TEST_CASES_DIR}/ves-event-with-only-IP-addresses
     ${TEST_CASES_DIR}/ves-event-with-empty-additional-fields
     ${TEST_CASES_DIR}/ves-event-with-empty-attachment-point
 
-Should not sent PNF ready when DMaaP event is invalid
+Should not send PNF ready when DMaaP event has missing required field
     [Documentation]    PRH get from DMaaP event with missing required field
     [Tags]    PRH    Invalid event
     [Template]    Verify event with missing required field is logged
     ${TEST_CASES_DIR}/ves-event-missing-field
 
-Should not sent PNF ready when DMaaP event is not JSON array
-    [Documentation]    Event from DMaaP is not JSON array
+Should not send PNF ready when DMaaP event is not JSON array
+    [Documentation]    Event from DMaaP is not an array of JSON objects
     [Tags]    PRH    Invalid event
-    Verify incorrect JSON event is logged    ${TEST_CASES_DIR}/ves-event-not-array
+    Verify incorrect JSON event is logged    ${TEST_CASES_DIR}/ves-event-not-a-json-object
 
-Should not sent PNF ready when AAI record doesn't exist
+Should not send PNF ready when AAI record doesn't exist
     [Documentation]    PRH get from DMaaP valid event but given PNF doesn't exists in AAI
     [Tags]    PRH    Missing AAI record
     Verify missing AAI record is logged    ${TEST_CASES_DIR}/aai-missing-entry
 
-Should not sent PNF ready when AAI is not responding
+Should not send PNF ready when AAI is not responding
     [Documentation]    PRH get from DMaaP valid event but AAI is not responding
     [Tags]    PRH    AAI not responding
     Verify AAI not responding is logged    ${TEST_CASES_DIR}/aai-not-responding
 
+Should send PNF ready when logical link exists and replace it in AAI
+    [Documentation]  PRH gets event from DMaaP with an attachment point, PNF is related to a logical link in AAI
+    [Tags]  PRH    Attachment point
+    [Template]  Verify PNF ready sent and old logical link replaced in AAI
+    ${TEST_CASES_DIR}/pnf-with-existing-logical-link
+    ${TEST_CASES_DIR}/pnf-with-different-logical-link
+
 BBS case event - Re-registration
-    [Documentation]    After regitered PNF, PRH reads another one PRH event with registration event
+    [Documentation]    After registered PNF, PRH reads another one PRH event with registration event
     [Tags]    PRH    Valid event    Re registraiton
     [Template]    Verify PNF re registration
     ${TEST_CASES_DIR}/re-registration
 
+Should send PNF ready when the associated service instance is non-Active
+    [Documentation]  PNF has a non active service instance, should send PNF_READY event
+    [Tags]  PRH Service instance non active
+    [Template]  Verify PNF ready sent when service instance non active
+    ${TEST_CASES_DIR}/service-instance-non-active
+
 PRH logging level change
-    [Documentation]    PRH logging level change from WARN to TRACE
+    [Documentation]    ad-hoc PRH logging level change using rest endpoint
     [Tags]    PRH    logging level
     Verify change logging level
-
-CBS configuration forced refresh
-    [Documentation]    It should be possible to force refresh PRH configuration from CBS
-    [Tags]    PRH    coniguration
-    Verify PRH configuration forced refresh
-
-CBS configuration scheduled refresh
-    [Documentation]    PRH should pull for CBS configuration updates according to schedule
-    [Tags]    PRH    coniguration
-    Verify scheduled CBS config updates
\ No newline at end of file