X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=csit%2Ftests%2Fcps-subscriptions%2Fcps-subscription-notification.robot;fp=csit%2Ftests%2Fcps-subscriptions%2Fcps-subscription-notification.robot;h=2d5152a2900d399941c20e54588bddf6cb9596ff;hb=bf8997853d7759383303b07bbeb780ca73428536;hp=b0e86657965fd714a36cf2835de30125012656d7;hpb=46782b7c8f0fbc8eece55188be0133ddb0e9907e;p=cps.git diff --git a/csit/tests/cps-subscriptions/cps-subscription-notification.robot b/csit/tests/cps-subscriptions/cps-subscription-notification.robot index b0e866579..2d5152a29 100644 --- a/csit/tests/cps-subscriptions/cps-subscription-notification.robot +++ b/csit/tests/cps-subscriptions/cps-subscription-notification.robot @@ -69,16 +69,20 @@ All Messages Are Produced and Consumed ${result}= Poll group_id=${GROUP_ID} only_value=False ${headers} Set Variable ${result[0].headers()} ${value} Set Variable ${result[0].value()} - ${valueAsDict}= Evaluate json.loads("""${value}""") json - ${specVersionHeaderValue} Set Variable ${headers[1][1]} - ${sourceHeaderValue} Set Variable ${headers[3][1]} - ${typeHeaderValue} Set Variable ${headers[4][1]} - ${correlationIdHeaderValue} Set Variable ${headers[6][1]} + ${valueAsDict}= Evaluate json.loads("""${value}""") json + FOR ${header_key_value_pair} IN @{headers} + Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_specversion" "1.0" + Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_source" "NCMP" + Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_type" "subscriptionCreatedStatus" + Compare Header Values ${header_key_value_pair[0]} ${header_key_value_pair[1]} "ce_correlationid" "SCO-9989752cm-subscription-001" + END Dictionaries Should Be Equal ${valueAsDict} ${ncmpOutEventJsonGlobal} - Should Be Equal As Strings ${specVersionHeaderValue} 1.0 - Should Be Equal As Strings ${sourceHeaderValue} NCMP - Should Be Equal As Strings ${typeHeaderValue} subscriptionCreatedStatus - Should Be Equal As Strings ${correlationIdHeaderValue} SCO-9989752cm-subscription-001 + +Compare Header Values + [Arguments] ${header_key} ${header_value} ${header_to_check} ${expected_header_value} + IF "${header_key}" == ${header_to_check} + Should Be Equal As Strings "${header_value}" ${expected_header_value} + END Basic Teardown [Arguments] ${group_id}