op-packages/luci-app-openclaw/tests/test_openclaw_node.sh
github-actions[bot] 86bccaae16 🍉 Sync 2026-06-08 21:29:51
2026-06-08 21:29:51 +08:00

20 lines
449 B
Bash
Executable File

#!/bin/sh
set -eu
. ./root/usr/libexec/openclaw-node.sh
fail() {
echo "FAIL: $1" >&2
exit 1
}
[ "$(oc_normalize_node_version v22.22.2)" = "22.22.2" ] || fail "normalize v"
oc_node_version_ge 22.19.0 22.19.0 || fail "exact version"
oc_node_version_ge 22.19.1 22.19.0 || fail "patch version"
oc_node_version_ge 22.22.2 22.19.0 || fail "supported LTS version"
if oc_node_version_ge 22.18.1 22.19.0; then
fail "older minor accepted"
fi
echo "ok"