rajendrajaiswal | 47b64d7 | 2019-02-06 16:09:24 +0000 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Testing PM Mapper functionality |
rajendrajaiswal | 47b64d7 | 2019-02-06 16:09:24 +0000 | [diff] [blame] | 3 | Library Collections |
rajendrajaiswal | 8f0afd8 | 2019-02-11 12:30:26 +0000 | [diff] [blame] | 4 | Library OperatingSystem |
| 5 | Library RequestsLibrary |
rajendrajaiswal | 47b64d7 | 2019-02-06 16:09:24 +0000 | [diff] [blame] | 6 | Library Process |
| 7 | |
| 8 | |
| 9 | *** Variables *** |
rajendrajaiswal | 7f7dab0 | 2019-02-15 10:23:53 +0000 | [diff] [blame] | 10 | ${CLI_EXEC_CLI_CONFIG} { head -n 5 | tail -1;} < /tmp/pmmapper.log |
rajendrajaiswal | 140bfd2 | 2019-02-14 14:47:15 +0000 | [diff] [blame] | 11 | ${CLI_EXEC_CLI_SUBS} curl -k https://${DR_PROV_IP}:8443/internal/prov |
rajendrajaiswal | 47b64d7 | 2019-02-06 16:09:24 +0000 | [diff] [blame] | 12 | |
| 13 | *** Test Cases *** |
| 14 | |
rajendrajaiswal | 140bfd2 | 2019-02-14 14:47:15 +0000 | [diff] [blame] | 15 | Verify PM Mapper Receive Configuraton From Config Binding Service |
rajendrajaiswal | 47b64d7 | 2019-02-06 16:09:24 +0000 | [diff] [blame] | 16 | [Tags] PM_MAPPER_01 |
rajendrajaiswal | 140bfd2 | 2019-02-14 14:47:15 +0000 | [diff] [blame] | 17 | [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 |
rajendrajaiswal | 7f7dab0 | 2019-02-15 10:23:53 +0000 | [diff] [blame] | 21 | Should Contain ${cli_cmd_output.stdout} Received pm-mapper configuration |
rajendrajaiswal | 140bfd2 | 2019-02-14 14:47:15 +0000 | [diff] [blame] | 22 | |
| 23 | Verify 3GPP PM Mapper Subscribes to Data Router |
| 24 | [Tags] PM_MAPPER_02 |
rajendrajaiswal | a157470 | 2019-02-14 10:29:45 +0000 | [diff] [blame] | 25 | [Documentation] Verify 3gpp pm mapper subscribes to data router |
rajendrajaiswal | 140bfd2 | 2019-02-14 14:47:15 +0000 | [diff] [blame] | 26 | ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_SUBS} shell=yes |
rajendrajaiswal | 47b64d7 | 2019-02-06 16:09:24 +0000 | [diff] [blame] | 27 | Log ${cli_cmd_output.stdout} |
rajendrajaiswal | a157470 | 2019-02-14 10:29:45 +0000 | [diff] [blame] | 28 | Should Be Equal As Strings ${cli_cmd_output.rc} 0 |
rajendrajaiswal | 7f7dab0 | 2019-02-15 10:23:53 +0000 | [diff] [blame] | 29 | Should Contain ${cli_cmd_output.stdout} 3gpppmmapper |
rajendrajaiswal | 8f0afd8 | 2019-02-11 12:30:26 +0000 | [diff] [blame] | 30 | |
| 31 | *** Keywords *** |
| 32 | |
| 33 | PostCall |
| 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} |