From c39748664846670f08f939067d184ee27f33cf5a Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 30 Apr 2026 01:35:12 +0100 Subject: [PATCH] fix(test): configure kitchen sink before enable --- scripts/e2e/lib/kitchen-sink-plugin/sweep.sh | 2 +- test/scripts/plugin-prerelease-test-plan.test.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/e2e/lib/kitchen-sink-plugin/sweep.sh b/scripts/e2e/lib/kitchen-sink-plugin/sweep.sh index 9c2956c68c0..b48315448a2 100644 --- a/scripts/e2e/lib/kitchen-sink-plugin/sweep.sh +++ b/scripts/e2e/lib/kitchen-sink-plugin/sweep.sh @@ -76,8 +76,8 @@ assert_kitchen_sink_removed() { run_success_scenario() { echo "Testing ${KITCHEN_SINK_LABEL} install from ${KITCHEN_SINK_SPEC}..." run_logged_print "kitchen-sink-install-${KITCHEN_SINK_LABEL}" node "$OPENCLAW_ENTRY" plugins install "$KITCHEN_SINK_SPEC" - run_logged_print "kitchen-sink-enable-${KITCHEN_SINK_LABEL}" node "$OPENCLAW_ENTRY" plugins enable "$KITCHEN_SINK_ID" configure_kitchen_sink_runtime + run_logged_print "kitchen-sink-enable-${KITCHEN_SINK_LABEL}" node "$OPENCLAW_ENTRY" plugins enable "$KITCHEN_SINK_ID" node "$OPENCLAW_ENTRY" plugins list --json >"/tmp/kitchen-sink-${KITCHEN_SINK_LABEL}-plugins.json" node "$OPENCLAW_ENTRY" plugins inspect "$KITCHEN_SINK_ID" --json >"/tmp/kitchen-sink-${KITCHEN_SINK_LABEL}-inspect.json" node "$OPENCLAW_ENTRY" plugins inspect --all --json >"/tmp/kitchen-sink-${KITCHEN_SINK_LABEL}-inspect-all.json" diff --git a/test/scripts/plugin-prerelease-test-plan.test.ts b/test/scripts/plugin-prerelease-test-plan.test.ts index c0042752ec0..a40dc5b3602 100644 --- a/test/scripts/plugin-prerelease-test-plan.test.ts +++ b/test/scripts/plugin-prerelease-test-plan.test.ts @@ -109,6 +109,16 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => { expect(sweepScript).toContain('plugins install "$KITCHEN_SINK_SPEC"'); expect(sweepScript).toContain("KITCHEN_SINK_PERSONALITY"); expect(sweepScript).toContain('plugins uninstall "$KITCHEN_SINK_SPEC" --force'); + const successScenario = sweepScript.slice( + sweepScript.indexOf("run_success_scenario()"), + sweepScript.indexOf("run_failure_scenario()"), + ); + expect(successScenario.indexOf('plugins install "$KITCHEN_SINK_SPEC"')).toBeLessThan( + successScenario.indexOf("configure_kitchen_sink_runtime"), + ); + expect(successScenario.indexOf("configure_kitchen_sink_runtime")).toBeLessThan( + successScenario.indexOf('plugins enable "$KITCHEN_SINK_ID"'), + ); expect(sweepScript).toContain("run_failure_scenario"); expect(assertionsScript).toContain("record.source !== source"); expect(assertionsScript).toContain("record.clawhubPackage !== packageName");