@@ -140,6 +140,29 @@ services:
140140 timeout : 3s
141141 retries : 3
142142 start_period : 10m
143+ forest-via-gateway :
144+ depends_on :
145+ forest-rpc-ready :
146+ condition : service_completed_successfully
147+ image : ${LOTUS_IMAGE}
148+ volumes :
149+ - node-data:/data
150+ networks :
151+ - api-tests
152+ entrypoint : ["/bin/bash", "-c"]
153+ command :
154+ - |
155+ set -euxo pipefail
156+ export FULLNODE_API_INFO="$(cat /data/forest-token):/dns/forest/tcp/${FOREST_RPC_PORT}/http"
157+ lotus-gateway run --api-max-lookback 72000h --listen 0.0.0.0:${FOREST_VIA_GATEWAY_RPC_PORT}
158+ healthcheck :
159+ test : |
160+ export FULLNODE_API_INFO="/dns/forest-via-gateway/tcp/${FOREST_VIA_GATEWAY_RPC_PORT}/http"
161+ lotus chain head || exit 1
162+ interval : 10s
163+ retries : 10
164+ start_period : 30s
165+ timeout : 5s
143166 lotus :
144167 depends_on :
145168 init :
@@ -242,9 +265,77 @@ services:
242265 status=$$?
243266 echo "==== API Compare Report ===="
244267 cat /data/api-compare-report/*.json || echo "(Report file not accessible)"
245- FULLNODE_API_INFO=$$FOREST_API_INFO forest-cli shutdown --force
246268 exit $$status
247269
270+ api-compare-gateway :
271+ depends_on :
272+ lotus-sync-wait :
273+ condition : service_completed_successfully
274+ forest-via-gateway :
275+ condition : service_healthy
276+ forest-wallet-import :
277+ condition : service_completed_successfully
278+ build :
279+ context : ../../../.
280+ dockerfile : ${FOREST_DOCKERFILE_OVERRIDE:-Dockerfile}
281+ volumes :
282+ - node-data:/data
283+ - ./filter-list-gateway:/data/filter-list-gateway
284+ networks :
285+ - api-tests
286+ environment :
287+ - RUST_LOG=info,forest::tool::subcommands=debug
288+ - FOREST_RPC_DEFAULT_TIMEOUT=120
289+ - FIL_PROOFS_PARAMETER_CACHE=${FIL_PROOFS_PARAMETER_CACHE}
290+ entrypoint : ["/bin/bash", "-c"]
291+ user : 0:0
292+ command :
293+ - |
294+ set -uxo pipefail
295+ # Test against websocket endpoint for online server
296+ LOTUS_API_INFO="$(cat /data/lotus-token):/dns/lotus/tcp/${LOTUS_RPC_PORT}/ws"
297+ FOREST_API_INFO="$(cat /data/forest-token):/dns/forest-via-gateway/tcp/${FOREST_VIA_GATEWAY_RPC_PORT}/ws"
298+ forest-tool api compare $(ls /data/*.car.zst | tail -n 1) \
299+ --forest $$FOREST_API_INFO \
300+ --lotus $$LOTUS_API_INFO \
301+ --n-tipsets 5 \
302+ --test-criteria-overrides=valid-and-timeout,timeout-and-timeout \
303+ --filter-file /data/filter-list-gateway \
304+ --miner-address ${MINER_ADDRESS} \
305+ --worker-address ${MINER_WORKER_ADDRESS} \
306+ --report-mode=failure-only \
307+ --report-dir=/data/api-compare-gateway-report
308+
309+ status=$$?
310+ echo "==== Gateway API Compare Report ===="
311+ cat /data/api-compare-gateway-report/*.json || echo "(Report file not accessible)"
312+ exit $$status
313+
314+ forest-shutdown :
315+ depends_on :
316+ api-compare :
317+ condition : service_completed_successfully
318+ api-compare-gateway :
319+ condition : service_completed_successfully
320+ build :
321+ context : ../../../.
322+ dockerfile : ${FOREST_DOCKERFILE_OVERRIDE:-Dockerfile}
323+ volumes :
324+ - node-data:/data
325+ networks :
326+ - api-tests
327+ environment :
328+ - RUST_LOG=info,forest::tool::subcommands=debug
329+ - FOREST_RPC_DEFAULT_TIMEOUT=120
330+ - FIL_PROOFS_PARAMETER_CACHE=${FIL_PROOFS_PARAMETER_CACHE}
331+ entrypoint : ["/bin/bash", "-c"]
332+ user : 0:0
333+ command :
334+ - |
335+ set -uxo pipefail
336+ export FULLNODE_API_INFO="$(cat /data/forest-token):/dns/forest/tcp/${FOREST_RPC_PORT}/http"
337+ forest-cli shutdown --force
338+
248339 api-compare-offline :
249340 profiles :
250341 - include-offline-rpc
0 commit comments