Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nightly-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 12 additions & 0 deletions test/e2e-script-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"];

Expand Down
6 changes: 5 additions & 1 deletion test/e2e/test-token-rotation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading