@@ -84,10 +84,13 @@ echo "${_endgroup}"
8484
8585echo " ${_group} Running moar tests !!!"
8686# Set up initial/required settings (InstallWizard request)
87+ export -f sentry_api_request get_csrf_token
8788sentry_api_request
" internal/options/?query=is:required" -X PUT --data
' {"mail.use-tls":false,"mail.username":"","mail.port":25,"system.admin-email":"[email protected] ","mail.password":"","system.url-prefix":"' " $SENTRY_TEST_HOST " ' ","auth.allow-registration":false,"beacon.anonymous":true}' > /dev/null
8889
89- SENTRY_DSN=$( sentry_api_request " projects/sentry/internal/keys/" | awk ' BEGIN { RS=",|:{\n"; FS="\""; } $2 == "public" && $4 ~ "^http" { print $4; exit; }' )
90+ # Hacky way to get around test flakiness for now
91+ sleep 60
9092# We ignore the protocol and the host as we already know those
93+ SENTRY_DSN=$( sentry_api_request " projects/sentry/internal/keys/" | awk ' BEGIN { RS=",|:{\n"; FS="\""; } $2 == "public" && $4 ~ "^http" { print $4; exit; }' )
9194DSN_PIECES=($( echo $SENTRY_DSN | sed -ne ' s|^https\{0,1\}://\([0-9a-z]\{1,\}\)@[^/]\{1,\}/\([0-9]\{1,\}\)$|\1 \2|p' | tr ' ' ' \n' ) )
9295SENTRY_KEY=${DSN_PIECES[0]}
9396PROJECT_ID=${DSN_PIECES[1]}
@@ -101,7 +104,6 @@ echo "Creating test event..."
101104curl -sf --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/" -o /dev/null
102105
103106EVENT_PATH=" projects/sentry/internal/events/$TEST_EVENT_ID /"
104- export -f sentry_api_request get_csrf_token
105107export SENTRY_TEST_HOST COOKIE_FILE EVENT_PATH
106108printf " Getting the test event back"
107109timeout 60 bash -c ' until $(sentry_api_request "$EVENT_PATH" -Isf -X GET -o /dev/null); do printf ' .' ; sleep 0.5; done'
0 commit comments