From 8f0afd8a099200fb7001ded306dceb015a63517b Mon Sep 17 00:00:00 2001 From: rajendrajaiswal Date: Mon, 11 Feb 2019 12:30:26 +0000 Subject: Updated Test and Setup files for PM Mapper Change-Id: I8dd4d60a6b54178575363f494d8ca7565306a514 Issue-ID: INT-863 Signed-off-by: Rajendra Jaiswal --- tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot | 29 ++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot index f65ef2b4..ccfa4968 100644 --- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot +++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot @@ -1,14 +1,19 @@ *** Settings *** Documentation Testing PM Mapper functionality -Library RequestsLibrary -Library OperatingSystem +Resource ../../common.robot Library Collections +Library json +Library OperatingSystem +Library RequestsLibrary +Library HttpLibrary.HTTP +Library String Library Process *** Variables *** -${GLOBAL_APPLICATION_ID} robot-ves -${CLI_EXEC_CLI} curl http://${CBS_IP}:10000/service_component/pmmapper +${BC_URL} http://${DMAAPBC_IP}:8080/webapi +${CLI_EXEC_CLI} curl http://${CBS_IP}:10000/service_component/pmmapper +${FEED1_DATA} { "feedName":"feed1", "feedVersion": "csit", "feedDescription":"generated for CSIT", "owner":"dgl", "asprClassification": "unclassified" } *** Test Cases *** @@ -18,4 +23,18 @@ Verify pmmapper configuration in consul through CBS [Documentation] Verify pmmapper configuraiton in consul through CBS ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes Log ${cli_cmd_output.stdout} - Should Contain ${cli_cmd_output.stdout} pm-mapper-filter \ No newline at end of file + Should Contain ${cli_cmd_output.stdout} pm-mapper-filter + +Create DR Feed through Bus Controller + [Tags] PM_MAPPER_02 + [Documentation] Create Feed on Data Router through Bus Controller + ${resp}= PostCall ${BC_URL}/feeds ${FEED1_DATA} + Should Be Equal As Integers ${resp.status_code} 200 + +*** Keywords *** + +PostCall + [Arguments] ${url} ${data} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests + [Return] ${resp} \ No newline at end of file -- cgit 1.2.3-korg