aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2019-02-15 16:03:08 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-15 16:03:08 +0000
commit253af8f0ae913a793cce223ce3bab5cacbbe4620 (patch)
treecd8032a423ae642e982503937da0988df99790e8
parentec239a34059e888586c640ba0ba528e11e57ed1b (diff)
parent7f7dab08c3bf1155c86823fd9064c866df07fec6 (diff)
Merge "Improvment to Test Case"
-rw-r--r--plans/dcaegen2-pmmapper/pmmapper/setup.sh3
-rw-r--r--tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot6
2 files changed, 5 insertions, 4 deletions
diff --git a/plans/dcaegen2-pmmapper/pmmapper/setup.sh b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
index 01e14689..b50d155d 100644
--- a/plans/dcaegen2-pmmapper/pmmapper/setup.sh
+++ b/plans/dcaegen2-pmmapper/pmmapper/setup.sh
@@ -137,7 +137,8 @@ done
PMMAPPER_IP=$(docker inspect '--format={{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' pmmapper)
docker exec datarouter-prov /bin/sh -c "echo '${PMMAPPER_IP}' 3gpppmmapper >> /etc/hosts"
sleep 10
-docker exec pmmapper /bin/sh -c "head -n 5 /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" >> /tmp/pmmapper.log
+docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper.log
+cat /tmp/pmmapper.log
curl -k https://$DR_PROV_IP:8443/internal/prov
#Pass any variables required by Robot test suites in ROBOT_VARIABLES
diff --git a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
index 51d78d43..1e3d9e91 100644
--- a/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
+++ b/tests/dcaegen2-pmmapper/pmmapper/pmmapper.robot
@@ -7,7 +7,7 @@ Library Process
*** Variables ***
-${CLI_EXEC_CLI_CONFIG} cat /tmp/pmmapper.log
+${CLI_EXEC_CLI_CONFIG} { head -n 5 | tail -1;} < /tmp/pmmapper.log
${CLI_EXEC_CLI_SUBS} curl -k https://${DR_PROV_IP}:8443/internal/prov
*** Test Cases ***
@@ -18,7 +18,7 @@ Verify PM Mapper Receive Configuraton From Config Binding Service
${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_CONFIG} shell=yes
Log ${cli_cmd_output.stdout}
Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} "3gpppmmapper"
+ Should Contain ${cli_cmd_output.stdout} Received pm-mapper configuration
Verify 3GPP PM Mapper Subscribes to Data Router
[Tags] PM_MAPPER_02
@@ -26,7 +26,7 @@ Verify 3GPP PM Mapper Subscribes to Data Router
${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_SUBS} shell=yes
Log ${cli_cmd_output.stdout}
Should Be Equal As Strings ${cli_cmd_output.rc} 0
- Should Contain ${cli_cmd_output.stdout} "3gpppmmapper"
+ Should Contain ${cli_cmd_output.stdout} 3gpppmmapper
*** Keywords ***