From f50eff4e50ef763f7eb9482e3dac5261e84b17cf Mon Sep 17 00:00:00 2001 From: Phillip Wittrock Date: Sat, 28 Oct 2017 13:43:49 -0700 Subject: [PATCH] fix issue with create stubs for non-namespaced types --- cmd/apiserver-boot/boot/create/resource.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/apiserver-boot/boot/create/resource.go b/cmd/apiserver-boot/boot/create/resource.go index 84bd561d9f..1719b51600 100644 --- a/cmd/apiserver-boot/boot/create/resource.go +++ b/cmd/apiserver-boot/boot/create/resource.go @@ -198,7 +198,7 @@ import ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object {{- if .NonNamespacedKind }} // +genclient:nonNamespaced -{{ end }} +{{- end }} // {{.Kind}} // +k8s:openapi-gen=true @@ -315,7 +315,7 @@ var _ = Describe("{{.Kind}}", func() { Describe("when sending a storage request", func() { Context("for a valid config", func() { It("should provide CRUD access to the object", func() { - client = cs.{{ title .Group}}{{title .Version}}Client.{{plural .Kind}}({{ if not .NonNamespacedKind }}"{{lower .Kind}}-test-valid"{{ end }}) + client = cs.{{ title .Group}}{{title .Version}}().{{plural .Kind}}({{ if not .NonNamespacedKind }}"{{lower .Kind}}-test-valid"{{ end }}) By("returning success from the create request") actual, err := client.Create(&instance) @@ -495,7 +495,7 @@ var _ = Describe("{{ .Kind }} controller", func() { Describe("when creating a new object", func() { It("invoke the reconcile method", func() { - client = cs.{{title .Group}}{{title .Version}}Client.{{ plural .Kind }}({{ if not .NonNamespacedKind }}"{{lower .Kind }}-controller-test-handler"{{ end }}) + client = cs.{{title .Group}}{{title .Version}}().{{ plural .Kind }}({{ if not .NonNamespacedKind }}"{{lower .Kind }}-controller-test-handler"{{ end }}) before = make(chan struct{}) after = make(chan struct{})