Skip to content

Commit

Permalink
Merge pull request #195 from pwittrock/simplify
Browse files Browse the repository at this point in the history
fix issue with create stubs for non-namespaced types
  • Loading branch information
Phillip Wittrock committed Oct 28, 2017
2 parents 3a66238 + f50eff4 commit 5e45c69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/apiserver-boot/boot/create/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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{})
Expand Down

0 comments on commit 5e45c69

Please sign in to comment.