Skip to content

Commit f283520

Browse files
committed
test: add unit tests for get-secret singleton + fix deploy script comment
- Add vitest + 5 unit tests for src/utils/get-secret.ts: * Returns secret value from Secret Manager * Calls Secret Manager on every invocation (no value caching — ensures secret rotation takes effect immediately) * Reuses singleton SecretManagerServiceClient across calls (proves no gRPC channel leak) * Throws on empty secret payload * Throws on Secret Manager error - Add code comment in deploy-quicknode-filter.sh explaining why templateArgs uses 'abiJson' instead of 'abi' (OpenAPI spec says 'abi', but the live evmAbiFilterGo endpoint requires 'abiJson' — empirically confirmed via 500 errors). Prevents future reviewers from flagging this as a bug.
1 parent 4b6a5f7 commit f283520

File tree

5 files changed

+1576
-29
lines changed

5 files changed

+1576
-29
lines changed

bin/deploy-quicknode-filter.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,14 @@ with open(os.environ["QN_PAYLOAD_FILE"], "w") as f:
137137

138138
info "Contracts: $(python3 -c "import json; d=json.load(open('${payload_file}')); print(', '.join(d['templateArgs']['contracts']))")"
139139

140-
# Update via template endpoint — internal name is evmAbiFilterGo (evmAbiFilter is display name)
141-
# No pause/unpause needed for template updates.
140+
# Update via template endpoint.
141+
# NOTE on field names vs the OpenAPI spec:
142+
# The public OpenAPI spec (evmAbiFilter schema) lists the field as "abi".
143+
# The actual live endpoint (evmAbiFilterGo) requires "abiJson" — empirically
144+
# confirmed: sending "abi" returns a 500, sending "abiJson" succeeds.
145+
# The display name in the UI is "evmAbiFilter"; the internal PATCH path uses
146+
# "evmAbiFilterGo". Both discrepancies are QuickNode API inconsistencies.
147+
# No pause/unpause needed — template updates are applied hot.
142148
log "Updating template args via /template/evmAbiFilterGo endpoint..."
143149
local update_response
144150
update_response=$(curl_api -X PATCH "${QN_API_BASE}/${webhook_id}/template/evmAbiFilterGo" \

0 commit comments

Comments
 (0)