diff --git a/.gitignore b/.gitignore index c25057f685..f749874ce0 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ *.swp *.swo *~ + +# Vscode files +.vscode diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index ad96f4ccb4..c492aec7a0 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -475,7 +475,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -578,7 +578,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -672,7 +672,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -791,7 +791,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -860,7 +860,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -956,7 +956,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -1024,7 +1024,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -1136,7 +1136,7 @@ var _ = Describe("Client", func() { err = cl.Patch(context.TODO(), u, client.ConstantPatch(types.MergePatchType, mergePatch)) Expect(err).NotTo(HaveOccurred()) - By("validating pathed Node has new annotation") + By("validating patched Node has new annotation") actual, err := clientset.CoreV1().Nodes().Get(nodeName, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) Expect(actual).NotTo(BeNil()) @@ -1240,7 +1240,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) @@ -1345,7 +1345,7 @@ var _ = Describe("Client", func() { close(done) }) - It("should fail if the object does not exists", func(done Done) { + It("should fail if the object does not exist", func(done Done) { cl, err := client.New(cfg, client.Options{}) Expect(err).NotTo(HaveOccurred()) Expect(cl).NotTo(BeNil()) diff --git a/pkg/client/options.go b/pkg/client/options.go index 46ddf66f97..395ce7838f 100644 --- a/pkg/client/options.go +++ b/pkg/client/options.go @@ -101,7 +101,6 @@ type DeleteOptions struct { // AsDeleteOptions returns these options as a metav1.DeleteOptions. // This may mutate the Raw field. func (o *DeleteOptions) AsDeleteOptions() *metav1.DeleteOptions { - if o == nil { return &metav1.DeleteOptions{} } @@ -309,7 +308,6 @@ type UpdateOptions struct { // AsUpdateOptions returns these options as a metav1.UpdateOptions. // This may mutate the Raw field. func (o *UpdateOptions) AsUpdateOptions() *metav1.UpdateOptions { - if o == nil { return &metav1.UpdateOptions{} }