mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Update with PR comments
This commit is contained in:
parent
aca62a1741
commit
32c5d938eb
@ -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) {
|
||||||
|
@ -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,
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user