Skip to content

Commit

Permalink
Fix local payload handling
Browse files Browse the repository at this point in the history
  • Loading branch information
DamnClin committed Sep 9, 2022
1 parent 53cddf8 commit 3b80968
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests-ci/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ if [ "$#" -ne 1 ]; then
show_syntax
fi

if test -f "modulePayload.json"; then
payloadFile="modulePayload.json"
elif test -f tests-ci/modulePayload.json; then
payloadFile=tests-ci/modulePayload.json
fi

application=$1

applyModules() {
for module in $@
do
local payload="$(sed "s/APP_NAME/$application/g" modulePayload.json)"
local payload="$(sed "s/APP_NAME/$application/g" $payloadFile)"
local api="/api/modules/$module/apply-patch"

echo "curl -o /dev/null -s -w "%{http_code}\n" \
Expand Down Expand Up @@ -336,6 +342,6 @@ else
fi

echo ""
cat "$filename"
cat "$payloadFile"
echo ""
sleep 5

0 comments on commit 3b80968

Please sign in to comment.