Skip to content

Commit 9c0c0ed

Browse files
committed
test(plugins): add live clawhub docker switch
1 parent 93ffc80 commit 9c0c0ed

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/e2e/lib/plugins/clawhub.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ run_plugins_clawhub_scenario() {
22
if [ "${OPENCLAW_PLUGINS_E2E_CLAWHUB:-1}" = "0" ]; then
33
echo "Skipping ClawHub plugin install and uninstall (OPENCLAW_PLUGINS_E2E_CLAWHUB=0)."
44
else
5-
echo "Testing ClawHub kitchen-sink plugin install and uninstall..."
5+
echo "Testing ClawHub plugin install and uninstall..."
66
CLAWHUB_PLUGIN_SPEC="${OPENCLAW_PLUGINS_E2E_CLAWHUB_SPEC:-clawhub:@openclaw/kitchen-sink}"
77
CLAWHUB_PLUGIN_ID="${OPENCLAW_PLUGINS_E2E_CLAWHUB_ID:-openclaw-kitchen-sink-fixture}"
88
export CLAWHUB_PLUGIN_SPEC CLAWHUB_PLUGIN_ID
@@ -35,7 +35,9 @@ run_plugins_clawhub_scenario() {
3535
return 1
3636
}
3737

38-
if [[ -z "${OPENCLAW_CLAWHUB_URL:-}" && -z "${CLAWHUB_URL:-}" ]]; then
38+
if [[ "${OPENCLAW_PLUGINS_E2E_LIVE_CLAWHUB:-0}" = "1" ]]; then
39+
export OPENCLAW_CLAWHUB_URL="${OPENCLAW_CLAWHUB_URL:-${CLAWHUB_URL:-https://clawhub.ai}}"
40+
elif [[ -z "${OPENCLAW_CLAWHUB_URL:-}" && -z "${CLAWHUB_URL:-}" ]]; then
3941
# Keep the release-path smoke hermetic; live ClawHub can rate-limit CI.
4042
clawhub_fixture_dir="$(mktemp -d "/tmp/openclaw-clawhub-fixture.XXXXXX")"
4143
start_clawhub_fixture_server "$clawhub_fixture_dir"

test/scripts/docker-build-helper.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ describe("docker build helper", () => {
278278
expect(sweep).toContain("scripts/e2e/lib/plugins/clawhub.sh");
279279
expect(clawhub).toContain("start_clawhub_fixture_server()");
280280
expect(clawhub).toContain('OPENCLAW_CLAWHUB_URL="http://127.0.0.1:');
281+
expect(clawhub).toContain("OPENCLAW_PLUGINS_E2E_LIVE_CLAWHUB");
281282
expect(clawhub).toContain("live ClawHub can rate-limit CI");
282283
expect(clawhub).toContain('[[ -z "${OPENCLAW_CLAWHUB_URL:-}" && -z "${CLAWHUB_URL:-}" ]]');
283284
});

0 commit comments

Comments
 (0)