Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 3.08 KB

File metadata and controls

82 lines (59 loc) · 3.08 KB

NVIDIA DRA GPU Driver E2E Test Suite

This directory contains the end-to-end (E2E) test suite for the NVIDIA Kubernetes DRA GPU Driver. It is implemented using Ginkgo v2 and Gomega and validates driver deployment and functionality in a real Kubernetes cluster.

Requirements

  • Kubernetes cluster (v1.26+ recommended)
  • Configured KUBECONFIG pointing to target cluster
  • Go 1.21+
  • Required environment variables (see below)

Environment Variables

Variable Required Description
KUBECONFIG Path to kubeconfig file
HELM_CHART Path or name of the Helm chart for the DRA driver
E2E_IMAGE_REPO Container image repository for the driver
E2E_IMAGE_TAG Image tag for the driver
E2E_IMAGE_PULL_POLICY Pull policy for the image (e.g., IfNotPresent)
E2E_TIMEOUT_SECONDS Timeout for test suite in seconds (default: 1800)
E2E_HOST_MANAGED_DRIVERS Whether host manages the NVIDIA driver (default: true)
LOG_ARTIFACTS_DIR Path to store logs and diagnostics (default: ./e2e_logs)
COLLECT_LOGS_FROM Namespace or component to collect logs from

Makefile Targets

The project includes a Makefile with the following targets:

GINKGO_ARGS ?=
LOG_ARTIFACTS_DIR ?= $(CURDIR)/e2e_logs

ginkgo:
	mkdir -p $(CURDIR)/bin
	GOBIN=$(CURDIR)/bin go install github.com/onsi/ginkgo/v2/ginkgo@latest

test-e2e: ginkgo
	$(CURDIR)/bin/ginkgo $(GINKGO_ARGS) -v --json-report $(CURDIR)/ginkgo.json ./tests/e2e/...

Running the Tests

You can run the test suite using:

make test-e2e

Or manually:

make ginkgo
./bin/ginkgo -v ./tests/e2e

Notes

  • Each test runs in an isolated namespace and cleans up automatically.
  • Node labels nvidia.com/gpu.present=true are applied for scheduling.
  • Helm values can be overridden for container-managed drivers.

License

Apache 2.0. See LICENSE.