Move CLI E2E runner into CLI tests

This commit is contained in:
vorotamoroz
2026-07-09 02:22:40 +00:00
parent 4d2326d0de
commit 8fec425d32
5 changed files with 21 additions and 9 deletions
+2 -3
View File
@@ -178,8 +178,7 @@ jobs:
- name: Run Compose CLI P2P E2E
env:
BENCH_COMMAND: cli-p2p-e2e
CLI_P2P_E2E_TASK: test:p2p-sync
CLI_E2E_TASK: test:p2p-sync
RELAY: ws://nostr-relay:7777/
PEERS_TIMEOUT: '20'
SYNC_TIMEOUT: '60'
@@ -188,7 +187,7 @@ jobs:
LIVESYNC_P2P_PEERS_RETRY: '1'
LIVESYNC_P2P_RELAY_READY_TIMEOUT_MS: '60000'
BENCH_LIVESYNC_TEST_TEE: '0'
run: docker compose -f test/bench-network/compose.yml run --build --rm bench-runner
run: docker compose -f test/bench-network/compose.yml run --build --rm bench-runner run-livesync-cli-e2e
- name: Show Compose diagnostics
if: failure()
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env sh
set -eu
TASK="${CLI_E2E_TASK:-test:p2p-sync}"
case "$TASK" in
test:p2p-host|test:p2p-peers|test:p2p-sync|test:p2p-three-nodes|test:p2p-upload-download)
exec deno task "$TASK"
;;
*)
echo "Unknown CLI_E2E_TASK: $TASK" >&2
echo "Expected one of: test:p2p-host, test:p2p-peers, test:p2p-sync, test:p2p-three-nodes, test:p2p-upload-download" >&2
exit 2
;;
esac
+2 -1
View File
@@ -31,6 +31,7 @@ RUN deno cache --lock=deno.lock \
test-p2p-sync.ts
COPY test/bench-network/run-bench.sh /usr/local/bin/run-livesync-bench
RUN chmod +x /usr/local/bin/run-livesync-bench
COPY src/apps/cli/testdeno/run-cli-e2e.sh /usr/local/bin/run-livesync-cli-e2e
RUN chmod +x /usr/local/bin/run-livesync-bench /usr/local/bin/run-livesync-cli-e2e
CMD ["run-livesync-bench"]
+1 -1
View File
@@ -96,7 +96,7 @@ services:
BENCH_PEERS_TIMEOUT: ${BENCH_PEERS_TIMEOUT:-60}
LIVESYNC_P2P_RELAY_READY_TIMEOUT_MS: ${LIVESYNC_P2P_RELAY_READY_TIMEOUT_MS:-60000}
BENCH_LIVESYNC_TEST_TEE: ${BENCH_LIVESYNC_TEST_TEE:-0}
CLI_P2P_E2E_TASK: ${CLI_P2P_E2E_TASK:-test:p2p-sync}
CLI_E2E_TASK: ${CLI_E2E_TASK:-test:p2p-sync}
RELAY: ${RELAY:-ws://nostr-relay:7777/}
PEERS_TIMEOUT: ${PEERS_TIMEOUT:-20}
SYNC_TIMEOUT: ${SYNC_TIMEOUT:-60}
+1 -4
View File
@@ -11,12 +11,9 @@ case "${BENCH_COMMAND:-cases}" in
p2p-split-node)
exec deno task bench:p2p-split-node
;;
cli-p2p-e2e)
exec deno task "${CLI_P2P_E2E_TASK:-test:p2p-sync}"
;;
*)
echo "Unknown BENCH_COMMAND: ${BENCH_COMMAND}" >&2
echo "Expected one of: cases, latency-sweep, p2p-split-node, cli-p2p-e2e" >&2
echo "Expected one of: cases, latency-sweep, p2p-split-node" >&2
exit 2
;;
esac