Skip to content

Commit e73396c

Browse files
committed
test: fix slack curl
1 parent 1cfb77c commit e73396c

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

e2e-tests/k6/integration/slack_notification.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,26 @@ else
3030
PAYLOAD="{\"channel\": \"${SLACK_CHANNEL}\", \"blocks\": [{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"\n\"}}, {\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \":warning: *Errors in Planner Web (Test: ${TEST_TYPE}, <${GH_REF}|ref>)*\"}}]}"
3131

3232
# Send slack notification
33-
curl -H "Content-type: application/json" \
34-
--data "${PAYLOAD}" \
33+
curl -X POST https://slack.com/api/chat.postMessage \
3534
-H "Authorization: Bearer ${SLACK_TOKEN}" \
3635
-H "Content-type: application/json; charset=utf-8" \
37-
-X POST https://slack.com/api/chat.postMessage
36+
--data "${PAYLOAD}"
3837
echo ""
3938
echo "** Slack notification sent: errors **"
40-
curl -H "Content-type: application/json" \
41-
--data "${PAYLOAD_DETAILS}" \
39+
curl -X POST https://slack.com/api/chat.postMessage \
4240
-H "Authorization: Bearer ${SLACK_TOKEN}" \
4341
-H "Content-type: application/json; charset=utf-8" \
44-
-X POST https://slack.com/api/chat.postMessage
42+
--data "${PAYLOAD_DETAILS}"
4543
echo ""
4644
echo "** Slack notification sent: error details **"
4745
else
4846
PAYLOAD="{\"channel\": \"${SLACK_CHANNEL}\", \"blocks\": [{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"\n\"}}, {\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \":white_check_mark: *All good for Planner Web (Test: ${TEST_TYPE}, <${GH_REF}|ref>)*\"}}]}"
4947

5048
# Send slack notification
51-
curl -H "Content-type: application/json" \
52-
--data "${PAYLOAD}" \
49+
curl -X POST https://slack.com/api/chat.postMessage \
5350
-H "Authorization: Bearer ${SLACK_TOKEN}" \
5451
-H "Content-type: application/json; charset=utf-8" \
55-
-X POST https://slack.com/api/chat.postMessage
52+
--data "${PAYLOAD}"
5653
echo ""
5754
echo "** Slack notification sent: success **"
5855
fi

0 commit comments

Comments
 (0)