fix(e2e): bound OpenShell installer fetch (#108810)

This commit is contained in:
Alix-007
2026-07-16 18:27:03 +08:00
committed by GitHub
parent 2488d794ca
commit de10d98c81
2 changed files with 27 additions and 1 deletions
@@ -851,7 +851,12 @@ jobs:
run: |
set -euo pipefail
export OPENSHELL_VERSION=v0.0.68
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/d64542f69d06694cbd203b64929d286dd0533bbb/install.sh | sh
installer_path="$(mktemp "${RUNNER_TEMP}/openshell-install.XXXXXX")"
trap 'rm -f "$installer_path"' EXIT
curl -LsSf --connect-timeout 10 --max-time 120 \
-o "$installer_path" \
https://raw.githubusercontent.com/NVIDIA/OpenShell/d64542f69d06694cbd203b64929d286dd0533bbb/install.sh
sh "$installer_path"
openshell --version
- name: Bootstrap OpenShell gateway
@@ -835,6 +835,27 @@ printf 'status=%s\\n' "$status"
expect(workflow).toContain("reachable from an OpenClaw branch or release tag");
});
it("downloads the OpenShell installer completely before execution", () => {
const workflow = parse(readFileSync(LIVE_E2E_WORKFLOW_PATH, "utf8"));
const steps = workflow.jobs.validate_special_e2e.steps as Array<{
name?: string;
run?: string;
}>;
const installStep = expectDefined(
steps.find((step) => step.name === "Install OpenShell CLI"),
"OpenShell install step",
);
const run = expectDefined(installStep.run, "OpenShell install command");
expect(run).toContain('installer_path="$(mktemp "${RUNNER_TEMP}/openshell-install.XXXXXX")"');
expect(run).toContain("curl -LsSf --connect-timeout 10 --max-time 120 \\");
expect(run).toContain('-o "$installer_path"');
expect(run).toContain('sh "$installer_path"');
expect(run).toContain("trap 'rm -f \"$installer_path\"' EXIT");
expect(run.indexOf('-o "$installer_path"')).toBeLessThan(run.indexOf('sh "$installer_path"'));
expect(run).not.toContain("install.sh | sh");
});
it("prints package size audits for release smoke tarballs", () => {
const script = readFileSync(SCRIPT_PATH, "utf8");