From a2441a256bbbd8e4d7edf6a5f40a441f21483548 Mon Sep 17 00:00:00 2001 From: ml Date: Tue, 28 Sep 2021 02:24:43 +0200 Subject: [PATCH] fix multiple typos --- pkg/registry/apps/deployment/strategy_test.go | 6 +++--- pkg/registry/core/pod/strategy_test.go | 12 ++++++------ pkg/util/bandwidth/utils.go | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/registry/apps/deployment/strategy_test.go b/pkg/registry/apps/deployment/strategy_test.go index 44d702e72e1..719ad3f4b82 100644 --- a/pkg/registry/apps/deployment/strategy_test.go +++ b/pkg/registry/apps/deployment/strategy_test.go @@ -185,7 +185,7 @@ func newDeploymentWithSelectorLabels(selectorLabels map[string]string) *apps.Dep } } -func newDeploymentWithHugePageValue(reousreceName api.ResourceName, value resource.Quantity) *apps.Deployment { +func newDeploymentWithHugePageValue(resourceName api.ResourceName, value resource.Quantity) *apps.Deployment { return &apps.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: deploymentName, @@ -221,11 +221,11 @@ func newDeploymentWithHugePageValue(reousreceName api.ResourceName, value resour Resources: api.ResourceRequirements{ Requests: api.ResourceList{ api.ResourceName(api.ResourceCPU): resource.MustParse("10"), - api.ResourceName(reousreceName): value, + api.ResourceName(resourceName): value, }, Limits: api.ResourceList{ api.ResourceName(api.ResourceCPU): resource.MustParse("10"), - api.ResourceName(reousreceName): value, + api.ResourceName(resourceName): value, }, }}, }}, diff --git a/pkg/registry/core/pod/strategy_test.go b/pkg/registry/core/pod/strategy_test.go index 63910c1f2b1..cc674303a25 100644 --- a/pkg/registry/core/pod/strategy_test.go +++ b/pkg/registry/core/pod/strategy_test.go @@ -1133,7 +1133,7 @@ func TestApplySeccompVersionSkew(t *testing.T) { } } -func newPodtWithHugePageValue(reousreceName api.ResourceName, value resource.Quantity) *api.Pod { +func newPodWithHugePageValue(resourceName api.ResourceName, value resource.Quantity) *api.Pod { return &api.Pod{ ObjectMeta: metav1.ObjectMeta{ Namespace: "default", @@ -1151,11 +1151,11 @@ func newPodtWithHugePageValue(reousreceName api.ResourceName, value resource.Qua Resources: api.ResourceRequirements{ Requests: api.ResourceList{ api.ResourceCPU: resource.MustParse("10"), - reousreceName: value, + resourceName: value, }, Limits: api.ResourceList{ api.ResourceCPU: resource.MustParse("10"), - reousreceName: value, + resourceName: value, }, }}, }, @@ -1171,7 +1171,7 @@ func TestPodStrategyValidate(t *testing.T) { }{ { name: "a new pod setting container with indivisible hugepages values", - pod: newPodtWithHugePageValue(api.ResourceHugePagesPrefix+"1Mi", resource.MustParse("1.1Mi")), + pod: newPodWithHugePageValue(api.ResourceHugePagesPrefix+"1Mi", resource.MustParse("1.1Mi")), }, { name: "a new pod setting init-container with indivisible hugepages values", @@ -1303,8 +1303,8 @@ func TestPodStrategyValidateUpdate(t *testing.T) { }{ { name: "an existing pod with indivisible hugepages values to a new pod with indivisible hugepages values", - newPod: newPodtWithHugePageValue(api.ResourceHugePagesPrefix+"2Mi", resource.MustParse("2.1Mi")), - oldPod: newPodtWithHugePageValue(api.ResourceHugePagesPrefix+"2Mi", resource.MustParse("2.1Mi")), + newPod: newPodWithHugePageValue(api.ResourceHugePagesPrefix+"2Mi", resource.MustParse("2.1Mi")), + oldPod: newPodWithHugePageValue(api.ResourceHugePagesPrefix+"2Mi", resource.MustParse("2.1Mi")), }, } diff --git a/pkg/util/bandwidth/utils.go b/pkg/util/bandwidth/utils.go index b29825bdfb9..05eeb7cdabc 100644 --- a/pkg/util/bandwidth/utils.go +++ b/pkg/util/bandwidth/utils.go @@ -30,7 +30,7 @@ func validateBandwidthIsReasonable(rsrc *resource.Quantity) error { return fmt.Errorf("resource is unreasonably small (< 1kbit)") } if rsrc.Value() > maxRsrc.Value() { - return fmt.Errorf("resoruce is unreasonably large (> 1Pbit)") + return fmt.Errorf("resource is unreasonably large (> 1Pbit)") } return nil }