|
59 | 59 | resourceName = "my-resource"
|
60 | 60 | resourceName2 = resourceName + "-2"
|
61 | 61 | claimName = podName + "-" + resourceName
|
62 |
| - claimName2 = podName + "-" + resourceName + "-2" |
63 | 62 | className = "my-resource-class"
|
64 | 63 | namespace = "default"
|
65 | 64 | attrName = resourceapi.QualifiedName("healthy") // device attribute only available on non-default node
|
|
88 | 87 | }
|
89 | 88 | return pod
|
90 | 89 | }()
|
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() |
96 | 90 | podWithTwoClaimTemplates = st.MakePod().Name(podName).Namespace(namespace).
|
97 | 91 | UID(podUID).
|
98 | 92 | PodResourceClaims(v1.PodResourceClaim{Name: resourceName, ResourceClaimTemplateName: &claimName}).
|
@@ -123,15 +117,9 @@ var (
|
123 | 117 | Namespace(namespace).
|
124 | 118 | Request(className).
|
125 | 119 | Obj()
|
126 |
| - deleteClaim = st.FromResourceClaim(claim). |
127 |
| - OwnerReference(podName, podUID, podKind). |
128 |
| - Deleting(metav1.Now()).Obj() |
129 | 120 | pendingClaim = st.FromResourceClaim(claim).
|
130 | 121 | OwnerReference(podName, podUID, podKind).
|
131 | 122 | Obj()
|
132 |
| - pendingClaim2 = st.FromResourceClaim(pendingClaim). |
133 |
| - Name(claimName2). |
134 |
| - Obj() |
135 | 123 | allocationResult = &resourceapi.AllocationResult{
|
136 | 124 | Devices: resourceapi.DeviceAllocationResult{
|
137 | 125 | Results: []resourceapi.DeviceRequestAllocationResult{{
|
@@ -167,9 +155,6 @@ var (
|
167 | 155 | otherAllocatedClaim = st.FromResourceClaim(otherClaim).
|
168 | 156 | Allocation(allocationResult).
|
169 | 157 | 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() |
173 | 158 | )
|
174 | 159 |
|
175 | 160 | func reserve(claim *resourceapi.ResourceClaim, pod *v1.Pod) *resourceapi.ResourceClaim {
|
|
0 commit comments