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
521 changes: 373 additions & 148 deletions test/e2e/docs/parity-map.yaml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions test/e2e/nemoclaw_scenarios/scenarios.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

platforms:
ubuntu-local:
os: ubuntu
Expand Down Expand Up @@ -106,6 +109,7 @@ setup_scenarios:
- smoke
- inference
- credentials
- baseline-onboarding
Comment thread
coderabbitai[bot] marked this conversation as resolved.
ubuntu-repo-cloud-hermes:
alias_for_plan: ubuntu-repo-docker__cloud-nvidia-hermes
dimensions:
Expand All @@ -118,6 +122,7 @@ setup_scenarios:
- smoke
- inference
- hermes-specific
- baseline-onboarding
gpu-repo-local-ollama-openclaw:
alias_for_plan: gpu-repo-docker-cdi__local-ollama-openclaw
dimensions:
Expand Down Expand Up @@ -177,6 +182,7 @@ setup_scenarios:
suites:
- smoke
- inference
- baseline-onboarding
runner_requirements:
- ubuntu-latest
- brev-api-token
Expand Down Expand Up @@ -206,6 +212,7 @@ setup_scenarios:
- inference
- credentials
- onboarding-state
- baseline-onboarding
ubuntu-invalid-nvidia-key-negative:
dimensions:
platform: ubuntu-local
Expand Down
31 changes: 31 additions & 0 deletions test/e2e/scenario-framework-tests/e2e-lib-helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -435,3 +435,34 @@ describe("Phase 1.E install dispatcher splits", () => {
expect(r.stdout + r.stderr).not.toMatch(/install-repo|install-curl|install-ollama/);
});
});

describe("baseline onboarding validation helper", () => {
it("baseline_helper_should_source_under_strict_shell_options", () => {
const r = runBash(`set -euo pipefail; source "${VALIDATION_SUITES}/lib/baseline_onboarding.sh"`);
expect(r.status, r.stderr).toBe(0);
});

it("baseline_cli_assertions_should_use_mocked_binaries", () => {
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "baseline-cli-"));
try {
const bin = path.join(tmp, "bin");
const ctx = path.join(tmp, "ctx");
fs.mkdirSync(bin); fs.mkdirSync(ctx);
fs.writeFileSync(path.join(ctx, "context.env"), "E2E_SANDBOX_NAME=sb1\nE2E_PROVIDER=nvidia\nE2E_INFERENCE_ROUTE=inference-local\n");
fs.writeFileSync(path.join(bin, "nemoclaw"), "#!/usr/bin/env bash\n[[ $1 == --help ]] && echo help && exit 0\n", { mode: 0o755 });
fs.writeFileSync(path.join(bin, "openshell"), "#!/usr/bin/env bash\nexit 0\n", { mode: 0o755 });
const r = runBash(`
set -euo pipefail
source "${VALIDATION_SUITES}/lib/baseline_onboarding.sh"
baseline_onboarding_load_context
baseline_assert_nemoclaw_on_path
baseline_assert_openshell_on_path
baseline_assert_nemoclaw_help_exits_zero
`, { E2E_CONTEXT_DIR: ctx, PATH: `${bin}:${process.env.PATH}` });
expect(r.status, r.stderr).toBe(0);
expect(r.stdout).toContain("PASS: validation.baseline_onboarding.nemoclaw_on_path");
expect(r.stdout).toContain("PASS: validation.baseline_onboarding.openshell_on_path");
expect(r.stdout).toContain("PASS: validation.baseline_onboarding.nemoclaw_help_exits_zero");
} finally { fs.rmSync(tmp, { recursive: true, force: true }); }
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../lib/baseline_onboarding.sh
source "$SCRIPT_DIR/../lib/baseline_onboarding.sh"
baseline_onboarding_load_context
baseline_assert_nemoclaw_on_path
baseline_assert_openshell_on_path
baseline_assert_nemoclaw_help_exits_zero
11 changes: 11 additions & 0 deletions test/e2e/validation_suites/baseline-onboarding/01-sandbox-state.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../lib/baseline_onboarding.sh
source "$SCRIPT_DIR/../lib/baseline_onboarding.sh"
baseline_onboarding_load_context
baseline_assert_sandbox_list_contains_context_sandbox
baseline_assert_sandbox_status_exits_zero
baseline_assert_logs_produce_output
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../lib/baseline_onboarding.sh
source "$SCRIPT_DIR/../lib/baseline_onboarding.sh"
baseline_onboarding_load_context
baseline_assert_inference_route_provider
79 changes: 79 additions & 0 deletions test/e2e/validation_suites/lib/baseline_onboarding.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

baseline_onboarding_pass() { printf 'PASS: %s %s\n' "$1" "${2:-}"; }
baseline_onboarding_fail() {
printf 'FAIL: %s %s\n' "$1" "${2:-}" >&2
return 1
}

baseline_onboarding_load_context() {
local context_file="${E2E_CONTEXT_DIR:?E2E_CONTEXT_DIR is required}/context.env"
# shellcheck disable=SC1090
source "$context_file"
: "${E2E_SANDBOX_NAME:?E2E_SANDBOX_NAME is required}"
: "${E2E_PROVIDER:?E2E_PROVIDER is required}"
: "${E2E_INFERENCE_ROUTE:?E2E_INFERENCE_ROUTE is required}"
}

baseline_assert_nemoclaw_on_path() {
if command -v nemoclaw >/dev/null 2>&1; then
baseline_onboarding_pass validation.baseline_onboarding.nemoclaw_on_path "nemoclaw found"
else
baseline_onboarding_fail validation.baseline_onboarding.nemoclaw_on_path "nemoclaw not on PATH"
fi
}

baseline_assert_openshell_on_path() {
if command -v openshell >/dev/null 2>&1; then
baseline_onboarding_pass validation.baseline_onboarding.openshell_on_path "openshell found"
else
baseline_onboarding_fail validation.baseline_onboarding.openshell_on_path "openshell not on PATH"
fi
}

baseline_assert_nemoclaw_help_exits_zero() {
local out
if out=$(nemoclaw --help 2>&1); then
baseline_onboarding_pass validation.baseline_onboarding.nemoclaw_help_exits_zero "nemoclaw --help exits 0"
else
baseline_onboarding_fail validation.baseline_onboarding.nemoclaw_help_exits_zero "nemoclaw --help failed: ${out:0:200}"
fi
}

baseline_assert_sandbox_list_contains_context_sandbox() {
local out
if out=$(nemoclaw list 2>&1) && awk -v n="$E2E_SANDBOX_NAME" '$1 == n { found = 1 } END { exit !found }' <<<"$out"; then
baseline_onboarding_pass validation.baseline_onboarding.sandbox_listed "$E2E_SANDBOX_NAME listed"
else
baseline_onboarding_fail validation.baseline_onboarding.sandbox_listed "sandbox not listed: ${out:0:200}"
fi
}

baseline_assert_sandbox_status_exits_zero() {
local out
if out=$(nemoclaw status "$E2E_SANDBOX_NAME" 2>&1); then
baseline_onboarding_pass validation.baseline_onboarding.sandbox_status "$E2E_SANDBOX_NAME status ok"
else
baseline_onboarding_fail validation.baseline_onboarding.sandbox_status "status failed: ${out:0:200}"
fi
}

baseline_assert_logs_produce_output() {
local out
if out=$(nemoclaw logs "$E2E_SANDBOX_NAME" 2>&1) && [[ -n "$out" ]]; then
baseline_onboarding_pass validation.baseline_onboarding.logs_available "logs available"
else
baseline_onboarding_fail validation.baseline_onboarding.logs_available "logs unavailable"
fi
}

baseline_assert_inference_route_provider() {
local expected="${1:-$E2E_PROVIDER}"
if [[ "${E2E_PROVIDER:-}" == "$expected" ]]; then
baseline_onboarding_pass validation.baseline_onboarding.inference_route_provider "provider=$expected route=${E2E_INFERENCE_ROUTE:-}"
else
baseline_onboarding_fail validation.baseline_onboarding.inference_route_provider "provider mismatch"
fi
}
14 changes: 14 additions & 0 deletions test/e2e/validation_suites/suites.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

suites:
smoke:
requires_state: &id001
Expand Down Expand Up @@ -30,6 +33,17 @@ suites:
steps: &id008
- id: credentials-present
script: security/credentials/00-credentials-present.sh
baseline-onboarding:
requires_state:
cli.installed: true
sandbox.status: running
steps:
- id: cli-and-openshell
script: baseline-onboarding/00-cli-and-openshell.sh
- id: sandbox-state
script: baseline-onboarding/01-sandbox-state.sh
- id: route-and-smoke
script: baseline-onboarding/02-route-and-smoke.sh
Comment thread
coderabbitai[bot] marked this conversation as resolved.
onboarding-state:
requires_state:
sandbox.status: running
Expand Down
Loading