Skip to content

Commit 8b17d5d

Browse files
committed
fix: resolve pr review comments
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent 71617ab commit 8b17d5d

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/scripts/public-api-e2e-tests.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,13 @@ die() {
5656
exit 1
5757
}
5858

59+
CURL_CONNECT_TIMEOUT=10
60+
CURL_MAX_TIME=30
61+
5962
api() {
6063
local method=$1 path=$2 body=${3-}
61-
local -a args=(-sS -w '\n%{http_code}' -X "$method" "${CDP_API_E2E_BASE_URL}${path}"
64+
local -a args=(-sS --connect-timeout "$CURL_CONNECT_TIMEOUT" --max-time "$CURL_MAX_TIME"
65+
-w '\n%{http_code}' -X "$method" "${CDP_API_E2E_BASE_URL}${path}"
6266
-H 'Content-Type: application/json'
6367
-H "Authorization: Bearer ${TOKEN}")
6468
[[ -n $body ]] && args+=(-d "$body")
@@ -110,7 +114,8 @@ json() {
110114

111115
fetch_token() {
112116
local response
113-
response="$(curl -sS -X POST "${AUTH0_STAGING_ISSUER}/oauth/token" \
117+
response="$(curl -sS --connect-timeout "$CURL_CONNECT_TIMEOUT" --max-time "$CURL_MAX_TIME" \
118+
-X POST "${AUTH0_STAGING_ISSUER}/oauth/token" \
114119
-H 'Content-Type: application/json' \
115120
-d "$(json \
116121
--arg client_id "$AUTH0_API_E2E_CLIENT_ID" \

backend/src/api/public/openapi.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,6 @@ paths:
855855
- name
856856
- domain
857857
- source
858-
- logo
859858
properties:
860859
name:
861860
type: string
@@ -872,7 +871,7 @@ paths:
872871
logo:
873872
type: string
874873
format: uri
875-
description: URL of the organization's logo.
874+
description: Optional URL of the organization's logo.
876875
example:
877876
name: Acme Corp
878877
domain: acme.com

docs/adr/0012-api-e2e-test-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ flowchart LR
6565
4. Call endpoints and assert status + body
6666
5. Alert `#cdp-alerts` on failure
6767

68-
`RUN_ID` is `GITHUB_RUN_ID` in Actions, otherwise timestamp + random. Fixtures include it so runs do not collide and leftovers stay easy to spot. The suite seeds over HTTP and does not require a wiped database between runs, only a reachable `api-e2e`.
68+
`RUN_ID` is `GITHUB_RUN_ID` (or a local timestamp) plus a `${RANDOM}` suffix. The suffix matters because workflow reruns reuse the same `GITHUB_RUN_ID`. Fixtures include it so runs do not collide and leftovers stay easy to spot. The suite seeds over HTTP and does not require a wiped database between runs, only a reachable `api-e2e`.
6969

7070
### What we assert (and what we do not)
7171

0 commit comments

Comments
 (0)