File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 {
1212 "config" : {
1313 "id" : " NW-<UUID>" ,
14- "url" : " http://localhost :9999"
14+ "url" : " http://<HOST> :9999/good-webhook "
1515 },
1616 "kind" : " webhook"
1717 },
1818 {
1919 "config" : {
2020 "id" : " NW-<UUID>" ,
21- "url" : " http://localhost :9999/invalid?x-set-response-status-code=500"
21+ "url" : " http://<HOST> :9999/invalid?x-set-response-status-code=500"
2222 },
2323 "kind" : " webhook"
2424 }
Original file line number Diff line number Diff line change @@ -18,11 +18,11 @@ subscription_id=$(fetch_data_jq "$test_user" POST create-subscription-for-projec
1818}" )
1919
2020webhook_id=$( fetch_data_jq " $test_user " POST create-webhook ' /users/test/notifications/delivery-methods/webhooks' ' .webhookId' " {
21- \" url\" : \" http://http-echo: ${echo_server_port} \"
21+ \" url\" : \" ${echo_server} /good-webhook \"
2222}" )
2323
2424failing_webhook_id=$( fetch_data_jq " $test_user " POST create-webhook ' /users/test/notifications/delivery-methods/webhooks' ' .webhookId' " {
25- \" url\" : \" http://http-echo: ${echo_server_port } /invalid?x-set-response-status-code=500\"
25+ \" url\" : \" ${echo_server } /invalid?x-set-response-status-code=500\"
2626}" )
2727
2828fetch " $test_user " POST add-webhook-to-subscription " /users/test/notifications/subscriptions/${subscription_id} /delivery-methods/add" " {
Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ ucm_credentials_file="${ucm_xdg_data_dir}/unisonlanguage/credentials.json"
1010# Executable to use when running unison transcripts
1111export UCM_PATH=" ${1:- " $( which ucm) " } "
1212export echo_server_port=9999
13+ export echo_server=" http://localhost:${echo_server_port} "
14+ # if CI=true, change the echo server url to a url from the docker network.
15+ if [ " ${CI:- false} " = " true" ]; then
16+ export echo_server=" http://echo-server:${echo_server_port} "
17+ fi
1318
1419# UCM to use within transcripts
1520transcript_ucm () {
@@ -111,7 +116,10 @@ clean_for_transcript() {
111116 # Replace all cursors in stdin with the string "<CURSOR>"
112117 sed -E ' s/"cursor": ?"[^"]+"/"cursor": "<CURSOR>"/g' | \
113118 # Replace all JWTs in stdin with the string "<JWT>"
114- sed -E ' s/eyJ([[:alnum:]_.-]+)/<JWT>/g'
119+ sed -E ' s/eyJ([[:alnum:]_.-]+)/<JWT>/g' | \
120+ # In docker we network things together with host names, but locally we just use localhost; so
121+ # this normalizes everything in transcripts.
122+ sed -E ' s/(localhost|http-echo):/<HOST>:/g'
115123}
116124
117125fetch () {
You can’t perform that action at this time.
0 commit comments