NVIDIA / NVIDIA/nvcf

nvcf-cli: Add reusable control-plane sanity test harness

Open
#421 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
218
Forks
72
Avg merge
1d 12h
Merged PRs (30d)
427

Description

Description

Add a small, reusable end-to-end sanity test harness that invokes the built nvcf-cli binary against a configured NVCF control plane. The initial suite should validate the top-level CLI and control-plane integration without depending on a specific deployment environment. Developers must be able to run the same tests against local, staging, self-managed, or other compatible control planes by supplying configuration and credentials at runtime.

Keep the first version intentionally small. It should establish a clear pattern that developers can extend with additional CLI workflows and assertions. The harness should exercise the CLI as a user would, through subprocess execution and its public command interface, rather than importing internal Go packages.

Definition of Done

  • A documented top-level command runs the sanity suite against a developer-selected NVCF control plane.
  • Control-plane API and invocation endpoints, credentials, account context, and environment-specific resource inputs are supplied through documented runtime configuration.
  • The repository does not contain hardcoded credentials, private endpoints, or environment-specific identifiers.
  • The harness invokes the built nvcf-cli binary and asserts command exit codes and relevant structured or stable output.
  • The initial suite includes a minimal connectivity and authentication check plus one representative end-to-end CLI workflow.
  • Resources created by a test use unique names and are removed by default, including cleanup after a failed assertion where practical.
  • Tests can be selected or extended without duplicating environment setup, CLI invocation, output capture, or cleanup logic.
  • Failures identify the command and phase that failed while redacting tokens, credentials, and other secret values.
  • Live tests skip with a clear message when required configuration is absent and do not run implicitly as part of the default unit-test suite.
  • Harness behavior that does not require a live control plane is covered by automated tests.
  • Documentation explains prerequisites, configuration, execution, extension points, cleanup behavior, and known limitations.

Resources

  • src/clis/nvcf-cli/
  • src/clis/nvcf-cli/test/e2e/
  • src/clis/nvcf-cli/README.md

By submitting this issue, you acknowledge that you are an assigned member of the NVCF development team and agree to follow our code of conduct and our contributing guidelines.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/clis/nvcf-cli/README.md and inspect src/clis/nvcf-cli/test/e2e/ alongside the CLI entry point. Define runtime configuration, subprocess invocation, output capture, cleanup, secret redaction, and live-test skipping without hardcoded environment details. Done means the documented harness runs a connectivity check and representative workflow, has automated non-live coverage, and cleans up resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, cloud, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.