Skip to content

Commit a32f695

Browse files
authored
Merge pull request kubernetes#129536 from pacoxu/fix-lint
fix dra test lint
2 parents 8a1db6e + 2653caa commit a32f695

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

pkg/scheduler/framework/plugins/dynamicresources/dynamicresources_test.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ var (
5959
resourceName = "my-resource"
6060
resourceName2 = resourceName + "-2"
6161
claimName = podName + "-" + resourceName
62-
claimName2 = podName + "-" + resourceName + "-2"
6362
className = "my-resource-class"
6463
namespace = "default"
6564
attrName = resourceapi.QualifiedName("healthy") // device attribute only available on non-default node
@@ -88,11 +87,6 @@ var (
8887
}
8988
return pod
9089
}()
91-
podWithTwoClaimNames = st.MakePod().Name(podName).Namespace(namespace).
92-
UID(podUID).
93-
PodResourceClaims(v1.PodResourceClaim{Name: resourceName, ResourceClaimName: &claimName}).
94-
PodResourceClaims(v1.PodResourceClaim{Name: resourceName2, ResourceClaimName: &claimName2}).
95-
Obj()
9690
podWithTwoClaimTemplates = st.MakePod().Name(podName).Namespace(namespace).
9791
UID(podUID).
9892
PodResourceClaims(v1.PodResourceClaim{Name: resourceName, ResourceClaimTemplateName: &claimName}).
@@ -123,15 +117,9 @@ var (
123117
Namespace(namespace).
124118
Request(className).
125119
Obj()
126-
deleteClaim = st.FromResourceClaim(claim).
127-
OwnerReference(podName, podUID, podKind).
128-
Deleting(metav1.Now()).Obj()
129120
pendingClaim = st.FromResourceClaim(claim).
130121
OwnerReference(podName, podUID, podKind).
131122
Obj()
132-
pendingClaim2 = st.FromResourceClaim(pendingClaim).
133-
Name(claimName2).
134-
Obj()
135123
allocationResult = &resourceapi.AllocationResult{
136124
Devices: resourceapi.DeviceAllocationResult{
137125
Results: []resourceapi.DeviceRequestAllocationResult{{
@@ -167,9 +155,6 @@ var (
167155
otherAllocatedClaim = st.FromResourceClaim(otherClaim).
168156
Allocation(allocationResult).
169157
Obj()
170-
171-
resourceSlice = st.MakeResourceSlice(nodeName, driver).Device("instance-1", nil).Obj()
172-
resourceSliceUpdated = st.FromResourceSlice(resourceSlice).Device("instance-1", map[resourceapi.QualifiedName]resourceapi.DeviceAttribute{attrName: {BoolValue: ptr.To(true)}}).Obj()
173158
)
174159

175160
func reserve(claim *resourceapi.ResourceClaim, pod *v1.Pod) *resourceapi.ResourceClaim {

0 commit comments

Comments
 (0)