mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +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
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"testing"
|
||||
)
|
||||
|
||||
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() {
|
||||
kind := apps.GroupKindElement{
|
||||
Kind: "Job",
|
||||
Group: "apps",
|
||||
Group: "batch",
|
||||
}
|
||||
Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred())
|
||||
Expect(visitor.visits).To(Equal(map[string]int{
|
||||
"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() {
|
||||
@ -133,21 +125,12 @@ var _ = Describe("When KindVisitor accepts a GroupKind", func() {
|
||||
|
||||
It("should Visit ReplicaSet iff the Kind is a ReplicaSet", func() {
|
||||
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",
|
||||
Group: "extensions",
|
||||
}
|
||||
Expect(kind.Accept(visitor)).ShouldNot(HaveOccurred())
|
||||
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() (internalclientset.Interface, error)
|
||||
|
||||
// KubernetesClientSetForVersion gives you back an external clientset
|
||||
// KubernetesClientSet gives you back an external clientset
|
||||
KubernetesClientSet() (*kubernetes.Clientset, error)
|
||||
|
||||
// Returns a RESTClient for accessing Kubernetes resources or an error.
|
||||
|
Loading…
Reference in New Issue
Block a user