Skip to content

Commit 7244aa0

Browse files
committed
DRA resource claim controller: update test
The resource claim controller is completely agnostic to the claim spec. It doesn't care about classes or devices, therefore it needs no changes in 1.31 besides the v1alpha2 -> v1alpha3 renaming from a previous commit.
1 parent bd9e920 commit 7244aa0

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

pkg/controller/resourceclaim/controller_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -527,9 +527,6 @@ func TestSyncHandler(t *testing.T) {
527527
func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourceapi.ResourceClaim {
528528
claim := &resourceapi.ResourceClaim{
529529
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
530-
Spec: resourceapi.ResourceClaimSpec{
531-
ResourceClassName: classname,
532-
},
533530
}
534531
if owner != nil {
535532
claim.OwnerReferences = []metav1.OwnerReference{*owner}
@@ -546,9 +543,6 @@ func makeGeneratedClaim(podClaimName, generateName, namespace, classname string,
546543
Namespace: namespace,
547544
Annotations: map[string]string{"resource.kubernetes.io/pod-claim-name": podClaimName},
548545
},
549-
Spec: resourceapi.ResourceClaimSpec{
550-
ResourceClassName: classname,
551-
},
552546
}
553547
if owner != nil {
554548
claim.OwnerReferences = []metav1.OwnerReference{*owner}
@@ -604,11 +598,6 @@ func makePod(name, namespace string, uid types.UID, podClaims ...v1.PodResourceC
604598
func makeTemplate(name, namespace, classname string) *resourceapi.ResourceClaimTemplate {
605599
template := &resourceapi.ResourceClaimTemplate{
606600
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
607-
Spec: resourceapi.ResourceClaimTemplateSpec{
608-
Spec: resourceapi.ResourceClaimSpec{
609-
ResourceClassName: classname,
610-
},
611-
},
612601
}
613602
return template
614603
}

0 commit comments

Comments
 (0)