mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #88511 from taesunny/pkg/registry
Fix pkg/registry typos in some error message, variable names etc
This commit is contained in:
commit
e6c4ac3f0b
@ -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))
|
||||
}
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
@ -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"}
|
||||
},
|
||||
|
@ -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 = ""
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user