-
Couldn't load subscription status.
- Fork 405
Refactor e2e test infrastructure with unified helpers leveraging operator clientsets #1788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Refactor e2e test infrastructure with unified helpers leveraging operator clientsets #1788
Conversation
0313d88 to
1b4d24e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for addressing the comments!
1b4d24e to
31a8207
Compare
|
Moving this to draft until I add tests to keep the github.com/NVIDIA/gpu-operator dep (by referencing it in the e2e/tests code). |
99feca6 to
10ad3e0
Compare
|
@karthikvetrivel Could you update |
|
@rajathagasthya This would require updating the main module's Kubernetes dependencies from v0.33.2 to v0.34.0. Should we still do it? |
|
@tariq1890 updated it recently in #1805, so we should be able to contain these changes to just the e2e module. |
…operator clientsets Signed-off-by: Karthik Vetrivel <[email protected]>
10ad3e0 to
70b967b
Compare
|
@rajathagasthya Fixed and amended. Thanks! |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR is the second step for migrating GPU Operator e2e tests from bash to Go/Ginkgo.
Overview
This PR introduces a comprehensive set of helper utilities that leverage the GPU operator's generated Go clientsets (
api/versioned).Note: This PR contains only the helper function infrastructure. Actual test implementations using these helpers will be added in a follow-up PR.
Changes
1. Helper Infrastructure (
tests/e2e/helpers/)Created comprehensive helper utilities:
operator.go- Helm client for deploying GPU Operatorclusterpolicy.go- ClusterPolicy CRUD + component toggles (DCGM, GFD, etc.)nvidiadriver.go- NVIDIADriver CR operations (cluster-scoped)daemonset.go- DaemonSet queries and readiness checksnode.go- Node labeling operationsworkload.go- GPU workload deployment and verificationpod.go- Pod operations and namespace managementStructure:
operator/helm.go→operator.go,kubernetes/pod.go→pod.gogpu_operator_test.go2. Constants (
tests/e2e/constants.go)Added shared constants:
DefaultPollingInterval- Standard 5s interval for wait operationsUpgradeDoneState- Driver upgrade completion state3. Updated Existing Tests
Modified
gpu_operator_test.goto use new helper package structure:operator.Client→helpers.OperatorClientk8stest.Client→helpers.PodClientNext Steps