blob: 1e3d9e91104431cba8f20ded7116cbdda7882cb2 [file] [log] [blame]
rajendrajaiswal47b64d72019-02-06 16:09:24 +00001*** Settings ***
2Documentation Testing PM Mapper functionality
rajendrajaiswal47b64d72019-02-06 16:09:24 +00003Library Collections
rajendrajaiswal8f0afd82019-02-11 12:30:26 +00004Library OperatingSystem
5Library RequestsLibrary
rajendrajaiswal47b64d72019-02-06 16:09:24 +00006Library Process
7
8
9*** Variables ***
rajendrajaiswal7f7dab02019-02-15 10:23:53 +000010${CLI_EXEC_CLI_CONFIG} { head -n 5 | tail -1;} < /tmp/pmmapper.log
rajendrajaiswal140bfd22019-02-14 14:47:15 +000011${CLI_EXEC_CLI_SUBS} curl -k https://${DR_PROV_IP}:8443/internal/prov
rajendrajaiswal47b64d72019-02-06 16:09:24 +000012
13*** Test Cases ***
14
rajendrajaiswal140bfd22019-02-14 14:47:15 +000015Verify PM Mapper Receive Configuraton From Config Binding Service
rajendrajaiswal47b64d72019-02-06 16:09:24 +000016 [Tags] PM_MAPPER_01
rajendrajaiswal140bfd22019-02-14 14:47:15 +000017 [Documentation] Verify 3gpp pm mapper successfully receive config data from CBS
18 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_CONFIG} shell=yes
19 Log ${cli_cmd_output.stdout}
20 Should Be Equal As Strings ${cli_cmd_output.rc} 0
rajendrajaiswal7f7dab02019-02-15 10:23:53 +000021 Should Contain ${cli_cmd_output.stdout} Received pm-mapper configuration
rajendrajaiswal140bfd22019-02-14 14:47:15 +000022
23Verify 3GPP PM Mapper Subscribes to Data Router
24 [Tags] PM_MAPPER_02
rajendrajaiswala1574702019-02-14 10:29:45 +000025 [Documentation] Verify 3gpp pm mapper subscribes to data router
rajendrajaiswal140bfd22019-02-14 14:47:15 +000026 ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_SUBS} shell=yes
rajendrajaiswal47b64d72019-02-06 16:09:24 +000027 Log ${cli_cmd_output.stdout}
rajendrajaiswala1574702019-02-14 10:29:45 +000028 Should Be Equal As Strings ${cli_cmd_output.rc} 0
rajendrajaiswal7f7dab02019-02-15 10:23:53 +000029 Should Contain ${cli_cmd_output.stdout} 3gpppmmapper
rajendrajaiswal8f0afd82019-02-11 12:30:26 +000030
31*** Keywords ***
32
33PostCall
34 [Arguments] ${url} ${data}
35 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
36 ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests
37 [Return] ${resp}