diff --git a/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh b/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh index b24f2511c7..72e6c950f5 100755 --- a/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh +++ b/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh @@ -139,8 +139,16 @@ for i in {1..10} ; do done echo "" -assertHttpStatusCode $(curl -X GET -o /dev/null -s -w "%{http_code} GET %{url_effective}\n" \ - 'http://'"$MINIKUBE_IP"':'"$CONTROLLER_PORT"'/restconf/data/network-topology:network-topology/topology=gnmi-topology/node='node-"${MINIKUBE_IP//.}"'?content=config') +response=$(curl -X GET -s 'http://'"$MINIKUBE_IP"':'"$CONTROLLER_PORT"'/restconf/data/network-topology:network-topology/topology=gnmi-topology/node='node-"${MINIKUBE_IP//.}"'?content=config') +http_status=$(echo "$response" | awk 'NR==1{print $1}') +body=$(echo "$response" | sed '1d') # Remove the HTTP status line + +# Print the HTTP status code +echo "HTTP Status Code: $http_status" + +# Print the response body +echo "Response Body:" +echo "$body" sleep 1 assertHttpStatusCode $(curl -X PUT -o /dev/null -s -w "%{http_code} PUT %{url_effective}\n" \