mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
kubelet/cm/cpumanager: Fix unused variable "skipIfPermissionsError"
The variable "skipIfPermissionsError" is not needed even when permission error happened.
This commit is contained in:
parent
c2536e2b0d
commit
b7e1f0bf17
@ -199,7 +199,6 @@ func TestCPUManagerGenerate(t *testing.T) {
|
|||||||
isTopologyBroken bool
|
isTopologyBroken bool
|
||||||
expectedPolicy string
|
expectedPolicy string
|
||||||
expectedError error
|
expectedError error
|
||||||
skipIfPermissionsError bool
|
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
description: "set none policy",
|
description: "set none policy",
|
||||||
@ -218,7 +217,6 @@ func TestCPUManagerGenerate(t *testing.T) {
|
|||||||
cpuPolicyName: "static",
|
cpuPolicyName: "static",
|
||||||
nodeAllocatableReservation: v1.ResourceList{v1.ResourceCPU: *resource.NewQuantity(3, resource.DecimalSI)},
|
nodeAllocatableReservation: v1.ResourceList{v1.ResourceCPU: *resource.NewQuantity(3, resource.DecimalSI)},
|
||||||
expectedPolicy: "static",
|
expectedPolicy: "static",
|
||||||
skipIfPermissionsError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "static policy - broken topology",
|
description: "static policy - broken topology",
|
||||||
@ -226,21 +224,18 @@ func TestCPUManagerGenerate(t *testing.T) {
|
|||||||
nodeAllocatableReservation: v1.ResourceList{},
|
nodeAllocatableReservation: v1.ResourceList{},
|
||||||
isTopologyBroken: true,
|
isTopologyBroken: true,
|
||||||
expectedError: fmt.Errorf("could not detect number of cpus"),
|
expectedError: fmt.Errorf("could not detect number of cpus"),
|
||||||
skipIfPermissionsError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "static policy - broken reservation",
|
description: "static policy - broken reservation",
|
||||||
cpuPolicyName: "static",
|
cpuPolicyName: "static",
|
||||||
nodeAllocatableReservation: v1.ResourceList{},
|
nodeAllocatableReservation: v1.ResourceList{},
|
||||||
expectedError: fmt.Errorf("unable to determine reserved CPU resources for static policy"),
|
expectedError: fmt.Errorf("unable to determine reserved CPU resources for static policy"),
|
||||||
skipIfPermissionsError: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "static policy - no CPU resources",
|
description: "static policy - no CPU resources",
|
||||||
cpuPolicyName: "static",
|
cpuPolicyName: "static",
|
||||||
nodeAllocatableReservation: v1.ResourceList{v1.ResourceCPU: *resource.NewQuantity(0, resource.DecimalSI)},
|
nodeAllocatableReservation: v1.ResourceList{v1.ResourceCPU: *resource.NewQuantity(0, resource.DecimalSI)},
|
||||||
expectedError: fmt.Errorf("the static policy requires systemreserved.cpu + kubereserved.cpu to be greater than zero"),
|
expectedError: fmt.Errorf("the static policy requires systemreserved.cpu + kubereserved.cpu to be greater than zero"),
|
||||||
skipIfPermissionsError: true,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user