test(gcb): Even more debug info on fail
This commit is contained in:
parent
f922986403
commit
0ef9bf5721
9
test.sh
9
test.sh
@ -24,6 +24,8 @@ cleanup () {
|
|||||||
|
|
||||||
if [ "$1" != "EXIT" ]; then
|
if [ "$1" != "EXIT" ]; then
|
||||||
echo "An error occurred, caught SIG$1 on line $2";
|
echo "An error occurred, caught SIG$1 on line $2";
|
||||||
|
docker-compose ps
|
||||||
|
docker-compose logs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Cleaning up..."
|
echo "Cleaning up..."
|
||||||
@ -76,11 +78,8 @@ PROJECT_ID=${DSN_PIECES[1]}
|
|||||||
|
|
||||||
TEST_EVENT_ID=$(export LC_ALL=C; head /dev/urandom | tr -dc "a-f0-9" | head -c 32)
|
TEST_EVENT_ID=$(export LC_ALL=C; head /dev/urandom | tr -dc "a-f0-9" | head -c 32)
|
||||||
# Thanks @untitaker - https://forum.sentry.io/t/how-can-i-post-with-curl-a-sentry-event-which-authentication-credentials/4759/2?u=byk
|
# Thanks @untitaker - https://forum.sentry.io/t/how-can-i-post-with-curl-a-sentry-event-which-authentication-credentials/4759/2?u=byk
|
||||||
TEST_EVENT=$(curl --data '{"event_id": "'"$TEST_EVENT_ID"'","level":"error","message":"a failure","extra":{"object":"42"}}' \
|
echo "Creating test event..."
|
||||||
-H 'Content-Type: application/json' \
|
curl -f --data '{"event_id": "'"$TEST_EVENT_ID"'","level":"error","message":"a failure","extra":{"object":"42"}}' -H 'Content-Type: application/json' -H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$SENTRY_KEY, sentry_client=test-bash/0.1" "$SENTRY_TEST_HOST/api/$PROJECT_ID/store/"
|
||||||
-H "X-Sentry-Auth: Sentry sentry_version=7, sentry_key=$SENTRY_KEY, sentry_client=test-bash/0.1" \
|
|
||||||
$SENTRY_TEST_HOST/api/$PROJECT_ID/store/ -sf)
|
|
||||||
echo "Created event: $TEST_EVENT"
|
|
||||||
|
|
||||||
EVENT_PATH="projects/sentry/internal/events/$TEST_EVENT_ID/"
|
EVENT_PATH="projects/sentry/internal/events/$TEST_EVENT_ID/"
|
||||||
export -f sentry_api_request get_csrf_token
|
export -f sentry_api_request get_csrf_token
|
||||||
|
Reference in New Issue
Block a user