Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a few typographic errors in test utils file #68903

Merged
merged 1 commit into from
Oct 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions pkg/controller/testutil/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var (

// FakeNodeHandler is a fake implementation of NodesInterface and NodeInterface. It
// allows test cases to have fine-grained control over mock behaviors. We also need
// PodsInterface and PodInterface to test list & delet pods, which is implemented in
// PodsInterface and PodInterface to test list & delete pods, which is implemented in
// the embedded client.Fake field.
type FakeNodeHandler struct {
*fake.Clientset
Expand All @@ -77,7 +77,7 @@ type FakeNodeHandler struct {
PatchWaitChan chan struct{}
}

// FakeLegacyHandler is a fake implemtation of CoreV1Interface.
// FakeLegacyHandler is a fake implementation of CoreV1Interface.
type FakeLegacyHandler struct {
v1core.CoreV1Interface
n *FakeNodeHandler
Expand Down Expand Up @@ -181,7 +181,7 @@ func (m *FakeNodeHandler) List(opts metav1.ListOptions) (*v1.NodeList, error) {
return nodeList, nil
}

// Delete delets a Node from the fake store.
// Delete deletes a Node from the fake store.
func (m *FakeNodeHandler) Delete(id string, opt *metav1.DeleteOptions) error {
m.lock.Lock()
defer func() {
Expand Down Expand Up @@ -304,7 +304,7 @@ func (m *FakeNodeHandler) Patch(name string, pt types.PatchType, data []byte, su
}
var originalNode v1.Node
if err = json.Unmarshal(originalObjJS, &originalNode); err != nil {
glog.Errorf("Failed to unmarshall original object: %v", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this same mistake is on line 340.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated my commit to include that fix. Thanks for the extra eyes.

glog.Errorf("Failed to unmarshal original object: %v", err)
return nil, nil
}

Expand Down Expand Up @@ -337,7 +337,7 @@ func (m *FakeNodeHandler) Patch(name string, pt types.PatchType, data []byte, su

var updatedNode v1.Node
if err = json.Unmarshal(patchedObjJS, &updatedNode); err != nil {
glog.Errorf("Failed to unmarshall patched object: %v", err)
glog.Errorf("Failed to unmarshal patched object: %v", err)
return nil, nil
}

Expand Down Expand Up @@ -382,7 +382,7 @@ func (f *FakeRecorder) generateEvent(obj runtime.Object, timestamp metav1.Time,
defer f.Unlock()
ref, err := ref.GetReference(legacyscheme.Scheme, obj)
if err != nil {
glog.Errorf("Encoutered error while getting reference: %v", err)
glog.Errorf("Encountered error while getting reference: %v", err)
return
}
event := f.makeEvent(ref, eventtype, reason, message)
Expand Down