Merge pull request #88511 from taesunny/pkg/registry

Fix pkg/registry typos in some error message, variable names etc
This commit is contained in:
Kubernetes Prow Robot 2020-02-25 05:12:49 -08:00 committed by GitHub
commit e6c4ac3f0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View File

@ -205,9 +205,9 @@ func TestUpdateStatus(t *testing.T) {
t.Fatalf("Unexpected error: %v", err)
}
obj, err := storage.Get(ctx, "foo", &metav1.GetOptions{})
autosclaerOut := obj.(*autoscaling.HorizontalPodAutoscaler)
autoscalerOut := obj.(*autoscaling.HorizontalPodAutoscaler)
// only compare the meaningful update b/c we can't compare due to metadata
if !apiequality.Semantic.DeepEqual(autoscalerIn.Status, autosclaerOut.Status) {
t.Errorf("unexpected object: %s", diff.ObjectDiff(autoscalerIn, autosclaerOut))
if !apiequality.Semantic.DeepEqual(autoscalerIn.Status, autoscalerOut.Status) {
t.Errorf("unexpected object: %s", diff.ObjectDiff(autoscalerIn, autoscalerOut))
}
}

View File

@ -270,13 +270,13 @@ func TestShouldWorkOnSecondary(t *testing.T) {
fakeClient := makeFakeClientSet()
primaryRegistry := makeRangeRegistry(t, tc.primaryNet.String())
var secondaryRegistery *mockRangeRegistry
var secondaryRegistry *mockRangeRegistry
if tc.secondaryNet != nil {
secondaryRegistery = makeRangeRegistry(t, tc.secondaryNet.String())
secondaryRegistry = makeRangeRegistry(t, tc.secondaryNet.String())
}
repair := NewRepair(0, fakeClient.CoreV1(), fakeClient.CoreV1(), tc.primaryNet, primaryRegistry, tc.secondaryNet, secondaryRegistery)
repair := NewRepair(0, fakeClient.CoreV1(), fakeClient.CoreV1(), tc.primaryNet, primaryRegistry, tc.secondaryNet, secondaryRegistry)
if repair.shouldWorkOnSecondary() != tc.expectedResult {
t.Errorf("shouldWorkOnSecondary should be %v and found %v", tc.expectedResult, repair.shouldWorkOnSecondary())
}

View File

@ -196,7 +196,7 @@ func TestBeforeUpdate(t *testing.T) {
expectErr: true,
},
{
name: "change selectpor",
name: "change selector",
tweakSvc: func(oldSvc, newSvc *api.Service) {
newSvc.Spec.Selector = map[string]string{"newkey": "newvalue"}
},

View File

@ -164,7 +164,7 @@ func TestUpdate(t *testing.T) {
})
return object
},
// invalid updateFunc: ObjeceMeta is not to be tampered with.
// invalid updateFunc: ObjectMeta is not to be tampered with.
func(obj runtime.Object) runtime.Object {
object := obj.(*networking.Ingress)
object.Name = ""

View File

@ -28,7 +28,7 @@ import (
"k8s.io/kubernetes/pkg/apis/networking/validation"
)
// ingressStrategy implements verification logic for Replication Ingresss.
// ingressStrategy implements verification logic for Replication Ingress.
type ingressStrategy struct {
runtime.ObjectTyper
names.NameGenerator

View File

@ -174,7 +174,7 @@ func TestVolumeAttachmentStatusStrategy(t *testing.T) {
expectedVolumeAttachment := statusVolumeAttachment.DeepCopy()
StatusStrategy.PrepareForUpdate(ctx, statusVolumeAttachment, volumeAttachment)
if !apiequality.Semantic.DeepEqual(statusVolumeAttachment, expectedVolumeAttachment) {
t.Errorf("unexpected objects differerence after modifying status: %v", diff.ObjectDiff(statusVolumeAttachment, expectedVolumeAttachment))
t.Errorf("unexpected objects difference after modifying status: %v", diff.ObjectDiff(statusVolumeAttachment, expectedVolumeAttachment))
}
// spec and metadata modifications should be dropped
@ -192,7 +192,7 @@ func TestVolumeAttachmentStatusStrategy(t *testing.T) {
StatusStrategy.PrepareForUpdate(ctx, newVolumeAttachment, volumeAttachment)
if !apiequality.Semantic.DeepEqual(newVolumeAttachment, volumeAttachment) {
t.Errorf("unexpected objects differerence after modifying spec: %v", diff.ObjectDiff(newVolumeAttachment, volumeAttachment))
t.Errorf("unexpected objects difference after modifying spec: %v", diff.ObjectDiff(newVolumeAttachment, volumeAttachment))
}
}