Update with PR comments

This commit is contained in:
Phillip Wittrock 2017-08-17 11:48:18 -07:00
parent aca62a1741
commit 32c5d938eb
3 changed files with 5 additions and 22 deletions

View File

@ -17,10 +17,10 @@ limitations under the License.
package apps_test package apps_test
import ( import (
"testing"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
"testing"
) )
func TestApps(t *testing.T) { func TestApps(t *testing.T) {

View File

@ -74,21 +74,13 @@ var _ = Describe("When KindVisitor accepts a GroupKind", func() {
It("should Visit Job iff the Kind is a Job", func() { It("should Visit Job iff the Kind is a Job", func() {
kind := apps.GroupKindElement{ kind := apps.GroupKindElement{
Kind: "Job", Kind: "Job",
Group: "apps", Group: "batch",
} }
Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred()) Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred())
Expect(visitor.visits).To(Equal(map[string]int{ Expect(visitor.visits).To(Equal(map[string]int{
"Job": 1, "Job": 1,
})) }))
kind = apps.GroupKindElement{
Kind: "Job",
Group: "extensions",
}
Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred())
Expect(visitor.visits).To(Equal(map[string]int{
"Job": 2,
}))
}) })
It("should Visit Pod iff the Kind is a Pod", func() { It("should Visit Pod iff the Kind is a Pod", func() {
@ -133,21 +125,12 @@ var _ = Describe("When KindVisitor accepts a GroupKind", func() {
It("should Visit ReplicaSet iff the Kind is a ReplicaSet", func() { It("should Visit ReplicaSet iff the Kind is a ReplicaSet", func() {
kind := apps.GroupKindElement{ kind := apps.GroupKindElement{
Kind: "ReplicaSet",
Group: "apps",
}
Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred())
Expect(visitor.visits).To(Equal(map[string]int{
"ReplicaSet": 1,
}))
kind = apps.GroupKindElement{
Kind: "ReplicaSet", Kind: "ReplicaSet",
Group: "extensions", Group: "extensions",
} }
Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred()) Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred())
Expect(visitor.visits).To(Equal(map[string]int{ Expect(visitor.visits).To(Equal(map[string]int{
"ReplicaSet": 2, "ReplicaSet": 1,
})) }))
}) })

View File

@ -93,7 +93,7 @@ type ClientAccessFactory interface {
// ClientSet gives you back an internal, generated clientset // ClientSet gives you back an internal, generated clientset
ClientSet() (internalclientset.Interface, error) ClientSet() (internalclientset.Interface, error)
// KubernetesClientSetForVersion gives you back an external clientset // KubernetesClientSet gives you back an external clientset
KubernetesClientSet() (*kubernetes.Clientset, error) KubernetesClientSet() (*kubernetes.Clientset, error)
// Returns a RESTClient for accessing Kubernetes resources or an error. // Returns a RESTClient for accessing Kubernetes resources or an error.