blob: ccfa496849f3b889eba080d44da5a5fb6a512857 [file] [log] [blame]
rajendrajaiswal47b64d72019-02-06 16:09:24 +00001*** Settings ***
2Documentation Testing PM Mapper functionality
rajendrajaiswal8f0afd82019-02-11 12:30:26 +00003Resource ../../common.robot
rajendrajaiswal47b64d72019-02-06 16:09:24 +00004Library Collections
rajendrajaiswal8f0afd82019-02-11 12:30:26 +00005Library json
6Library OperatingSystem
7Library RequestsLibrary
8Library HttpLibrary.HTTP
9Library String
rajendrajaiswal47b64d72019-02-06 16:09:24 +000010Library Process
11
12
13*** Variables ***
rajendrajaiswal8f0afd82019-02-11 12:30:26 +000014${BC_URL} http://${DMAAPBC_IP}:8080/webapi
15${CLI_EXEC_CLI} curl http://${CBS_IP}:10000/service_component/pmmapper
16${FEED1_DATA} { "feedName":"feed1", "feedVersion": "csit", "feedDescription":"generated for CSIT", "owner":"dgl", "asprClassification": "unclassified" }
rajendrajaiswal47b64d72019-02-06 16:09:24 +000017
18
19*** Test Cases ***
20
21Verify pmmapper configuration in consul through CBS
22 [Tags] PM_MAPPER_01
23 [Documentation] Verify pmmapper configuraiton in consul through CBS
24 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes
25 Log ${cli_cmd_output.stdout}
rajendrajaiswal8f0afd82019-02-11 12:30:26 +000026 Should Contain ${cli_cmd_output.stdout} pm-mapper-filter
27
28Create DR Feed through Bus Controller
29 [Tags] PM_MAPPER_02
30 [Documentation] Create Feed on Data Router through Bus Controller
31 ${resp}= PostCall ${BC_URL}/feeds ${FEED1_DATA}
32 Should Be Equal As Integers ${resp.status_code} 200
33
34*** Keywords ***
35
36PostCall
37 [Arguments] ${url} ${data}
38 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
39 ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
40 [Return] ${resp}