Fix: pkg/apis Typos in comments, function name, error message

poicy -> policy
varialbes -> variables
exeuction -> execution
Resaurces -> Resources
TestSetDefaulEndpointsProtocol -> TestSetDefaultEndpointsProtocol
TestSetDefaulServiceTargetPort -> TestSetDefaultServiceTargetPort
TestSetDefaulServiceExternalTraffic -> TestSetDefaultServiceExternalTraffic
This commit is contained in:
Taesun Lee 2020-02-24 00:06:09 +09:00
parent 96dfa3f605
commit b873cbbed5
4 changed files with 7 additions and 7 deletions

View File

@ -608,7 +608,7 @@ func TestSetDefaultReplicationControllerInitContainers(t *testing.T) {
assertImagePullPolicy := func(got, expected *v1.Container) error {
if got.ImagePullPolicy != expected.ImagePullPolicy {
return fmt.Errorf("different image pull poicy: got <%v>, expected <%v>", got.ImagePullPolicy, expected.ImagePullPolicy)
return fmt.Errorf("different image pull policy: got <%v>, expected <%v>", got.ImagePullPolicy, expected.ImagePullPolicy)
}
return nil
}
@ -1375,7 +1375,7 @@ func TestSetDefaultPersistentVolumeClaim(t *testing.T) {
}
}
func TestSetDefaulEndpointsProtocol(t *testing.T) {
func TestSetDefaultEndpointsProtocol(t *testing.T) {
in := &v1.Endpoints{Subsets: []v1.EndpointSubset{
{Ports: []v1.EndpointPort{{}, {Protocol: "UDP"}, {}}},
}}
@ -1397,7 +1397,7 @@ func TestSetDefaulEndpointsProtocol(t *testing.T) {
}
}
func TestSetDefaulServiceTargetPort(t *testing.T) {
func TestSetDefaultServiceTargetPort(t *testing.T) {
in := &v1.Service{Spec: v1.ServiceSpec{Ports: []v1.ServicePort{{Port: 1234}}}}
obj := roundTrip(t, runtime.Object(in))
out := obj.(*v1.Service)
@ -1457,7 +1457,7 @@ func TestSetDefaultServicePort(t *testing.T) {
}
}
func TestSetDefaulServiceExternalTraffic(t *testing.T) {
func TestSetDefaultServiceExternalTraffic(t *testing.T) {
in := &v1.Service{}
obj := roundTrip(t, runtime.Object(in))
out := obj.(*v1.Service)

View File

@ -33,7 +33,7 @@ func init() {
localSchemeBuilder.Register(addDefaultingFuncs, addConversionFuncs)
}
// TODO: remove these global varialbes
// TODO: remove these global variables
// GroupName is the group name use in this package
const GroupName = ""

View File

@ -382,7 +382,7 @@ func ValidatePriorityLevelConfigurationSpec(spec *flowcontrol.PriorityLevelConfi
return allErrs
}
// ValidateLimitedPriorityLevelConfiguration validates the configuration for an exeuction-limited priority level
// ValidateLimitedPriorityLevelConfiguration validates the configuration for an execution-limited priority level
func ValidateLimitedPriorityLevelConfiguration(lplc *flowcontrol.LimitedPriorityLevelConfiguration, fldPath *field.Path) field.ErrorList {
var allErrs field.ErrorList
if lplc.AssuredConcurrencyShares <= 0 {

View File

@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
)
// ResourceMatches returns the result of the rule.Resaurces matching.
// ResourceMatches returns the result of the rule.Resources matching.
func ResourceMatches(rule *PolicyRule, combinedRequestedResource, requestedSubresource string) bool {
for _, ruleResource := range rule.Resources {
// if everything is allowed, we match