mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 17:53:39 +00:00
fix(e2e): preserve frozen scenario error diagnostics (#142645)
This commit is contained in:
parent
738c982be2
commit
2d25402ecb
2 changed files with 22 additions and 1 deletions
|
|
@ -71,7 +71,7 @@ if ! docker_e2e_run_with_harness \
|
|||
-v "$SCENARIO_PATH:/app/scripts/e2e/lib/release-typed-onboarding/scenario.sh:ro" \
|
||||
-v "$ONBOARD_ASSERTIONS:/app/scripts/e2e/lib/release-scenarios/assertions.mjs:ro" \
|
||||
-v "$ONBOARD_MOCK_OPENAI_CONFIG:/app/scripts/e2e/lib/fixtures/mock-openai-config.mjs:ro" \
|
||||
-i "$IMAGE_NAME" bash scripts/e2e/lib/release-typed-onboarding/scenario.sh >"$run_log" 2>&1; then
|
||||
-i "$IMAGE_NAME" bash -E scripts/e2e/lib/release-typed-onboarding/scenario.sh >"$run_log" 2>&1; then
|
||||
docker_e2e_print_log "$run_log"
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -3016,6 +3016,27 @@ docker_e2e_docker_run_cmd run demo
|
|||
);
|
||||
});
|
||||
|
||||
it("propagates frozen typed-onboarding ERR traps through nested helpers", () => {
|
||||
const runner = readFileSync(RELEASE_TYPED_ONBOARDING_DOCKER_E2E_PATH, "utf8");
|
||||
const invocation = runner.match(
|
||||
/-i "\$IMAGE_NAME" bash(?<flags>(?: +-[A-Za-z]+)*) scripts\/e2e\/lib\/release-typed-onboarding\/scenario\.sh/u,
|
||||
);
|
||||
expect(invocation?.groups?.flags).toBeDefined();
|
||||
const bashFlags = invocation?.groups?.flags?.trim().split(/ +/u).filter(Boolean) ?? [];
|
||||
const diagnostic = "typed-onboarding diagnostic status=23";
|
||||
const script = `set -euo pipefail
|
||||
trap 'status=$?; printf "typed-onboarding diagnostic status=%s\\n" "$status" >&2' ERR
|
||||
inner() { return 23; }
|
||||
outer() { inner; }
|
||||
outer
|
||||
`;
|
||||
|
||||
const result = spawnSync("bash", [...bashFlags, "-c", script], { encoding: "utf8" });
|
||||
|
||||
expect(result.status).toBe(23);
|
||||
expect(result.stderr.trim().split("\n")).toEqual([diagnostic]);
|
||||
});
|
||||
|
||||
it("prints channel-add failures through the shared E2E logger", () => {
|
||||
const script = readFileSync(NPM_ONBOARD_CHANNEL_AGENT_DOCKER_E2E_PATH, "utf8");
|
||||
expect(script).toContain(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue