[VOL-3999] Restarting port-forward after restarting VOLTHA-core
component
Adding explicit error messages for ONOS App upgrade test
Change-Id: I80a2c56dfd26d88d2494d89c67990eb4697fd55c
diff --git a/libraries/onos.robot b/libraries/onos.robot
index a5e3f10..130c8c5 100755
--- a/libraries/onos.robot
+++ b/libraries/onos.robot
@@ -720,7 +720,7 @@
[Arguments] ${url} ${app_name}
[Documentation] This keyword deactivates and uninstalls the given ONOS App
${rc}= Run And Return Rc curl --fail -sSL -X DELETE ${url}/onos/v1/applications/${app_name}
- Should Be Equal As Integers ${rc} 0
+ Should Be Equal As Integers ${rc} 0 Can't delete ${app_name} from ONOS
Verify ONOS App Active
[Arguments] ${url} ${app_name} ${app_version}=${EMPTY}
@@ -733,7 +733,7 @@
... curl --fail -sSL ${url}/onos/v1/applications/${app_name} | jq -r .version
Run Keyword If '${app_version}'!='${EMPTY}'
... Run Keywords
- ... Should Be Equal As Integers ${rc1} 0
+ ... Should Be Equal As Integers ${rc1} 0 Can't read app ${app_name} status from ONOS
... AND Should Be Equal '${output1}' '${app_version}'
Install And Activate ONOS App
@@ -743,7 +743,7 @@
... curl --fail -sSL -H Content-Type:application/octet-stream -
... X POST ${url}/onos/v1/applications?activate=true --data-binary \@${app_oar_file}
${rc} ${output} Run And Return Rc And Output ${cmd}
- Should Be Equal As Integers ${rc} 0
+ Should Be Equal As Integers ${rc} 0 Can't load onos app ${app_oar_file} to ONOS"
Log ${output}
Get ONOS App Details
@@ -751,5 +751,5 @@
[Documentation] Retrieves ONOS App Details
${rc} ${output} Run And Return Rc And Output
... curl --fail -sSL ${url}/onos/v1/applications/${app_name}
- Should Be Equal As Integers ${rc} 0
+ Should Be Equal As Integers ${rc} 0 Can't read app ${app_name} details from ONOS
[Return] ${output}
diff --git a/libraries/voltctl.robot b/libraries/voltctl.robot
index a2b7d8f..73015c7 100755
--- a/libraries/voltctl.robot
+++ b/libraries/voltctl.robot
@@ -650,7 +650,8 @@
[Documentation] Gets the device id by matching for ${serial_number}
${rc} ${id}= Run and Return Rc and Output
... voltctl -c ${VOLTCTL_CONFIG} device list --filter=SerialNumber=${serial_number} --format='{{.Id}}'
- Should Be Equal As Integers ${rc} 0
+ Should Be Equal As Integers ${rc} 0 "Error while fetching device list from VOLTHA"
+ Should Not Be Equal ${id} ${EMPTY} Cannot find device by Serial Number ${serial_number}
Log ${id}
[Return] ${id}
diff --git a/tests/software-upgrades/ONOS_AppsUpgrade.robot b/tests/software-upgrades/ONOS_AppsUpgrade.robot
index 485ff71..222ef7e 100644
--- a/tests/software-upgrades/ONOS_AppsUpgrade.robot
+++ b/tests/software-upgrades/ONOS_AppsUpgrade.robot
@@ -136,8 +136,8 @@
Download App OAR File
[Documentation] This keyword downloads the app oar file from the given url to the specified location
[Arguments] ${oar_url} ${oar_file}
- ${rc} Run And Return Rc curl -L ${oar_url} > ${oar_file}
- Should Be Equal As Integers ${rc} 0
+ ${rc} Run And Return Rc curl --fail -sSL ${oar_url} > ${oar_file}
+ Should Be Equal As Integers ${rc} 0 Can't download ONOS app from ${oar_url}
Create ONOS Apps Under Test List
[Documentation] Creates a list of ONOS Apps to Test from the input variable string
diff --git a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
index 369f9b0..30016a7 100755
--- a/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
+++ b/tests/software-upgrades/Voltha_ComponentsUpgrade.robot
@@ -101,6 +101,7 @@
${pod_image_1} ${app_ver_1} ${helm_chart_1} Get Pod Image And App Version And Helm Chart By Label
... ${NAMESPACE} app ${label}
Log ${label}: image, app ver & helm chart after upgrade: ${pod_image_1}, ${app_ver_1} & ${helm_chart_1}
+ Restart VOLTHA Port Forward voltha-api
Wait Until Keyword Succeeds ${timeout} 2s Perform Sanity Test ${suppressaddsubscriber}
END
${podStatusOutput}= Run kubectl get pods -n ${NAMESPACE}