Skip to content

OCPNODE-4108: add E2E tests for upstream dra-example-driver#31064

Open
sabujmaity wants to merge 1 commit intoopenshift:mainfrom
sabujmaity:feat/OCPNODE-4108-add-dra-example-e2e
Open

OCPNODE-4108: add E2E tests for upstream dra-example-driver#31064
sabujmaity wants to merge 1 commit intoopenshift:mainfrom
sabujmaity:feat/OCPNODE-4108-add-dra-example-e2e

Conversation

@sabujmaity
Copy link
Copy Markdown

@sabujmaity sabujmaity commented Apr 24, 2026

Summary

Add hardware-independent DRA end-to-end regression tests using the upstream
dra-example-driver.
No GPU or special hardware required — the driver emulates 9 virtual devices
per node.

JIRA: https://issues.redhat.com/browse/OCPNODE-4108

Test Scenarios

  1. Single Device Allocation - DeviceClass + ResourceClaim + Pod lifecycle
  2. Resource Cleanup - verifies claim survives pod deletion and is unreserved
  3. Multi-Device Allocation - requests 2 devices (skips if < 2 available)
  4. Claim Sharing - two pods referencing same claim (handles both outcomes)
  5. ResourceClaimTemplate - inline claim creation and automatic cleanup

OpenShift Adaptations

  • Grants system:openshift:scc:privileged to driver ServiceAccount
  • Applies PSA privileged labels on driver namespace
  • Adds control-plane tolerations for SNO scheduling
  • Uses image.ShellImage() for proper release payload image mirroring

Verified On

  • OpenShift 4.21 SNO cluster
  • All 5 tests PASS
  • known-image-checker MonitorTest: 0 failures (image mirroring verified)
  • go build and go vet clean

Summary by CodeRabbit

  • Tests

    • Added a new serial end-to-end suite for the DRA example driver covering device allocation, multi-device scenarios, claim sharing, pod lifecycle/cleanup, and ResourceClaimTemplate behavior; includes device validation, resource builders, and automated prerequisites installer.
  • Documentation

    • Added an extended test guide with prerequisites, install/quick-start steps, test commands, OpenShift adaptations, and troubleshooting.
  • Chores

    • Registered the example tests with the extended test suite and added OWNERS metadata.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants