mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-19 07:25:19 +00:00
Replace numeric index-based extended resource naming with descriptive
string-based naming in DRA E2E tests for improved readability and
maintainability.
Changes:
- Replaced ExtendedResourceName(int) with ExtendedResourceName(string)
to use descriptive suffixes instead of numeric indices
- Replaced Class(int) with Class() and add ClassWithExtendedResource()
for explicit extended resource creation
- Removed SingletonIndex constant in favor of e2enode.SampleDeviceResourceName
- Added DeviceClassWrapper with builder pattern methods
(WithName, WithExtendedResource)
- Updated all test cases to use descriptive resource names ("cleanup",
"quota", "overcommitment", etc.) instead of numeric indices (0, 1, 2)
- Used resourceapi.ResourceDeviceClassPrefix for implicit extended
resource names
This refactoring makes test code more readable and maintainable by making
extended resources and device class naming explicit rather than implicit through
index values.