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.
This commit is contained in:
parent
c526d7796e
commit
0fc78b9bcc
@ -527,9 +527,6 @@ func TestSyncHandler(t *testing.T) {
|
|||||||
func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourceapi.ResourceClaim {
|
func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourceapi.ResourceClaim {
|
||||||
claim := &resourceapi.ResourceClaim{
|
claim := &resourceapi.ResourceClaim{
|
||||||
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
|
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
|
||||||
Spec: resourceapi.ResourceClaimSpec{
|
|
||||||
ResourceClassName: classname,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
if owner != nil {
|
if owner != nil {
|
||||||
claim.OwnerReferences = []metav1.OwnerReference{*owner}
|
claim.OwnerReferences = []metav1.OwnerReference{*owner}
|
||||||
@ -546,9 +543,6 @@ func makeGeneratedClaim(podClaimName, generateName, namespace, classname string,
|
|||||||
Namespace: namespace,
|
Namespace: namespace,
|
||||||
Annotations: map[string]string{"resource.kubernetes.io/pod-claim-name": podClaimName},
|
Annotations: map[string]string{"resource.kubernetes.io/pod-claim-name": podClaimName},
|
||||||
},
|
},
|
||||||
Spec: resourceapi.ResourceClaimSpec{
|
|
||||||
ResourceClassName: classname,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
if owner != nil {
|
if owner != nil {
|
||||||
claim.OwnerReferences = []metav1.OwnerReference{*owner}
|
claim.OwnerReferences = []metav1.OwnerReference{*owner}
|
||||||
@ -604,11 +598,6 @@ func makePod(name, namespace string, uid types.UID, podClaims ...v1.PodResourceC
|
|||||||
func makeTemplate(name, namespace, classname string) *resourceapi.ResourceClaimTemplate {
|
func makeTemplate(name, namespace, classname string) *resourceapi.ResourceClaimTemplate {
|
||||||
template := &resourceapi.ResourceClaimTemplate{
|
template := &resourceapi.ResourceClaimTemplate{
|
||||||
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
|
ObjectMeta: metav1.ObjectMeta{Name: name, Namespace: namespace},
|
||||||
Spec: resourceapi.ResourceClaimTemplateSpec{
|
|
||||||
Spec: resourceapi.ResourceClaimSpec{
|
|
||||||
ResourceClassName: classname,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
return template
|
return template
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user