Skip to content

Commit 1d822f1

Browse files
committed
Fix linter errors
1 parent bf8354d commit 1d822f1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/kubelet/kuberuntime/kuberuntime_manager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ func (m *kubeGenericRuntimeManager) doPodResizeAction(pod *v1.Pod, podStatus *ku
672672
podResources := cm.ResourceConfigForPod(pod, m.cpuCFSQuota, uint64((m.cpuCFSQuotaPeriod.Duration)/time.Microsecond), false)
673673
if podResources == nil {
674674
klog.ErrorS(nil, "Unable to get resource configuration", "pod", pod.Name)
675-
result.Fail(fmt.Errorf("Unable to get resource configuration processing resize for pod %s", pod.Name))
675+
result.Fail(fmt.Errorf("unable to get resource configuration processing resize for pod %s", pod.Name))
676676
return
677677
}
678678
setPodCgroupConfig := func(rName v1.ResourceName, setLimitValue bool) error {
@@ -751,7 +751,7 @@ func (m *kubeGenericRuntimeManager) doPodResizeAction(pod *v1.Pod, podStatus *ku
751751
}
752752
if currentPodMemoryUsage >= uint64(*podResources.Memory) {
753753
klog.ErrorS(nil, "Aborting attempt to set pod memory limit less than current memory usage", "pod", pod.Name)
754-
result.Fail(fmt.Errorf("Aborting attempt to set pod memory limit less than current memory usage for pod %s", pod.Name))
754+
result.Fail(fmt.Errorf("aborting attempt to set pod memory limit less than current memory usage for pod %s", pod.Name))
755755
return
756756
}
757757
if errResize := resizeContainers(v1.ResourceMemory, int64(*currentPodMemoryConfig.Memory), *podResources.Memory, 0, 0); errResize != nil {

pkg/kubelet/kuberuntime/kuberuntime_manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2685,7 +2685,7 @@ func TestUpdatePodContainerResources(t *testing.T) {
26852685
}
26862686
fakeRuntime.Called = []string{}
26872687
err := m.updatePodContainerResources(pod, tc.resourceName, containersToUpdate)
2688-
assert.NoError(t, err, dsc)
2688+
require.NoError(t, err, dsc)
26892689

26902690
if tc.invokeUpdateResources {
26912691
assert.Contains(t, fakeRuntime.Called, "UpdateContainerResources", dsc)

0 commit comments

Comments
 (0)