fix(e2e): add metrics ports and enforce shellcheck errors

- Add EDGE_METRICS_PORT and NODE_METRICS_PORT to e2e smoke test configs
- Remove '|| true' from shellcheck to fail on lint errors
- Delete iop.db (generated test artifact)
This commit is contained in:
toki 2026-05-17 19:42:06 +09:00
parent 95844ef6e2
commit 96e647984d
2 changed files with 9 additions and 1 deletions

BIN
iop.db

Binary file not shown.

View file

@ -6,7 +6,7 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
if command -v shellcheck >/dev/null 2>&1; then
echo "[e2e] running shellcheck..."
shellcheck "$0" "$REPO_ROOT/bin/edge.sh" "$REPO_ROOT/bin/node.sh" || true
shellcheck "$0" "$REPO_ROOT/bin/edge.sh" "$REPO_ROOT/bin/node.sh"
else
echo "[e2e] shellcheck not found, skipping"
fi
@ -18,6 +18,8 @@ EDGE_CONFIG="$TMP_DIR/edge.yaml"
NODE_CONFIG="$TMP_DIR/node.yaml"
PORT=$((30000 + RANDOM % 10000))
EDGE_METRICS_PORT=$((40000 + RANDOM % 10000))
NODE_METRICS_PORT=$((50000 + RANDOM % 10000))
PROFILE="${IOP_E2E_PROFILE:-mock}"
IDLE_SECONDS="${IOP_E2E_IDLE_SECONDS:-0}"
IS_PERSISTENT=0
@ -30,6 +32,8 @@ if [ "$PROFILE" = "mock" ]; then
cat <<EOF > "$EDGE_CONFIG"
server:
listen: "127.0.0.1:$PORT"
metrics:
port: $EDGE_METRICS_PORT
nodes:
- id: test-node
alias: test-node
@ -90,6 +94,8 @@ else
cat <<EOF > "$EDGE_CONFIG"
server:
listen: "127.0.0.1:$PORT"
metrics:
port: $EDGE_METRICS_PORT
nodes:
- id: test-node
alias: test-node
@ -113,6 +119,8 @@ transport:
edge_addr: "127.0.0.1:$PORT"
token: test-token
reconnect_interval: 1s
metrics:
port: $NODE_METRICS_PORT
node:
id: test-node
alias: test-node