diff --git a/.github/workflows/nightly-e2e.yaml b/.github/workflows/nightly-e2e.yaml index 06aaeab8db..280daa0b52 100644 --- a/.github/workflows/nightly-e2e.yaml +++ b/.github/workflows/nightly-e2e.yaml @@ -956,6 +956,7 @@ jobs: - name: Run token rotation E2E test env: NVIDIA_INFERENCE_API_KEY: ${{ secrets.NVIDIA_INFERENCE_API_KEY }} + NEMOCLAW_E2E_USE_NVIDIA_SECRET_AS_COMPATIBLE: "1" NEMOCLAW_NON_INTERACTIVE: "1" NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE: "1" NEMOCLAW_POLICY_TIER: "open" diff --git a/test/e2e-script-workflow.test.ts b/test/e2e-script-workflow.test.ts index f75dbf9629..e5a2aab373 100644 --- a/test/e2e-script-workflow.test.ts +++ b/test/e2e-script-workflow.test.ts @@ -552,6 +552,18 @@ describe("E2E reusable workflow contract", () => { } }); + it("routes legacy token rotation through the CI compatible inference endpoint", () => { + const runStep = nightlyWorkflow.jobs["token-rotation-e2e"].steps?.find( + (step) => step.name === "Run token rotation E2E test", + ); + const script = readFileSync(new URL("./e2e/test-token-rotation.sh", import.meta.url), "utf8"); + + expect(runStep?.env?.NVIDIA_INFERENCE_API_KEY).toBe("${{ secrets.NVIDIA_INFERENCE_API_KEY }}"); + expect(runStep?.env?.NEMOCLAW_E2E_USE_NVIDIA_SECRET_AS_COMPATIBLE).toBe("1"); + expect(script).toContain("lib/ci-compatible-inference.sh"); + expect(script).toContain("nemoclaw_e2e_configure_compatible_inference"); + }); + it("keeps converted jobs dispatchable through the reusable workflow", () => { const cloudJob = nightlyWorkflow.jobs["cloud-e2e"]; diff --git a/test/e2e/test-token-rotation.sh b/test/e2e/test-token-rotation.sh index f459be49c0..55be2ebf2f 100755 --- a/test/e2e/test-token-rotation.sh +++ b/test/e2e/test-token-rotation.sh @@ -16,7 +16,7 @@ # # Prerequisites: # - Docker running -# - NVIDIA_INFERENCE_API_KEY set (or fake OpenAI endpoint) +# - NVIDIA_INFERENCE_API_KEY set (or CI-compatible inference env) # - TELEGRAM_BOT_TOKEN_A and TELEGRAM_BOT_TOKEN_B set (can be fake) # - DISCORD_BOT_TOKEN_A and DISCORD_BOT_TOKEN_B set (can be fake) # - SLACK_BOT_TOKEN_A and SLACK_BOT_TOKEN_B set (can be fake; xoxb- prefix) @@ -37,6 +37,8 @@ export NEMOCLAW_E2E_DEFAULT_TIMEOUT=2400 SCRIPT_DIR_TIMEOUT="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)" # shellcheck source=test/e2e/e2e-timeout.sh source "${SCRIPT_DIR_TIMEOUT}/e2e-timeout.sh" +# shellcheck source=test/e2e/lib/ci-compatible-inference.sh +. "${SCRIPT_DIR_TIMEOUT}/lib/ci-compatible-inference.sh" PASS=0 FAIL=0 @@ -95,6 +97,8 @@ SANDBOX_NAME="${NEMOCLAW_SANDBOX_NAME:-e2e-token-rotation}" REGISTRY="$HOME/.nemoclaw/sandboxes.json" INSTALL_LOG="/tmp/nemoclaw-e2e-install.log" +nemoclaw_e2e_configure_compatible_inference + # ── Prerequisite checks ────────────────────────────────────────── if [ -z "${TELEGRAM_BOT_TOKEN_A:-}" ] || [ -z "${TELEGRAM_BOT_TOKEN_B:-}" ]; then