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.
- Kubernetes cluster (v1.26+ recommended)
- Configured
KUBECONFIGpointing to target cluster - Go 1.21+
- Required environment variables (see below)
| 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 |
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/...You can run the test suite using:
make test-e2eOr manually:
make ginkgo
./bin/ginkgo -v ./tests/e2e- Each test runs in an isolated namespace and cleans up automatically.
- Node labels
nvidia.com/gpu.present=trueare applied for scheduling. - Helm values can be overridden for container-managed drivers.
Apache 2.0. See LICENSE.