From 175620b342f8146e4db1a6e8fa4ba7625dbd2f21 Mon Sep 17 00:00:00 2001 From: Mirco Nasuti <mirco.nasuti@chuv.ch> Date: Thu, 22 Dec 2016 10:52:54 +0100 Subject: [PATCH] use simple bash search/replace instead of sed following codacy hint --- tests/test-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-run.sh b/tests/test-run.sh index aecbe15b5..b14c8f91a 100755 --- a/tests/test-run.sh +++ b/tests/test-run.sh @@ -76,7 +76,7 @@ fi echo "Testing articles API..." 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_ref=$(echo "${ARTICLE_REF}" | sed "s/\"createdAt\":[0-9]*,//g") +response_ref=$(echo "${ARTICLE_REF//\"createdAt\":*[0-9],/}") if [ "${response}" != "${response_ref}" ]; then echo "Tests failed - failed to save/load article" exit 1 -- GitLab