Skip to content
Snippets Groups Projects
Commit 175620b3 authored by Mirco Nasuti's avatar Mirco Nasuti
Browse files

use simple bash search/replace instead of sed following codacy hint

parent 83e01d4e
No related branches found
No related tags found
No related merge requests found
...@@ -76,7 +76,7 @@ fi ...@@ -76,7 +76,7 @@ fi
echo "Testing articles API..." echo "Testing articles API..."
curl -s -H "Content-Type: application/json" -X POST -d ${ARTICLE_BODY} ${GATEWAY_IP}:65440/services/articles > /dev/null curl -s -H "Content-Type: application/json" -X POST -d ${ARTICLE_BODY} ${GATEWAY_IP}:65440/services/articles > /dev/null
response=$(curl -s ${GATEWAY_IP}:65440/services/articles | sed "s/\"createdAt\":[0-9]*,//g") response=$(curl -s ${GATEWAY_IP}:65440/services/articles | sed "s/\"createdAt\":[0-9]*,//g")
response_ref=$(echo "${ARTICLE_REF}" | sed "s/\"createdAt\":[0-9]*,//g") response_ref=$(echo "${ARTICLE_REF//\"createdAt\":*[0-9],/}")
if [ "${response}" != "${response_ref}" ]; then if [ "${response}" != "${response_ref}" ]; then
echo "Tests failed - failed to save/load article" echo "Tests failed - failed to save/load article"
exit 1 exit 1
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment