-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkubernetes_test.go
More file actions
47 lines (41 loc) · 893 Bytes
/
kubernetes_test.go
File metadata and controls
47 lines (41 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package netkat_test
import (
"encoding/json"
"fmt"
"k8s.io/apimachinery/pkg/apis/meta/v1"
)
func (s *StoreSuite) TestGets() {
pods := s.client.GetPods()
services := s.client.GetServices()
ingresses := s.client.GetIngresses()
po, err := json.Marshal(pods)
if err != nil {
fmt.Print(po)
}
se, err := json.Marshal(services)
if err != nil {
fmt.Print(se)
}
in, err := json.Marshal(ingresses)
if err != nil {
fmt.Print(in)
}
}
func (s *StoreSuite) TestGetServices() {
_, err := s.client.CoreV1().Services("").List(v1.ListOptions{})
if err != nil {
s.T().Fatal(err)
}
}
func (s *StoreSuite) TestGetIngress() {
_, err := s.client.ExtensionsV1beta1().Ingresses("").List(v1.ListOptions{})
if err != nil {
s.T().Fatal(err)
}
}
func (s *StoreSuite) TestGetPods() {
_, err := s.client.CoreV1().Pods("").List(v1.ListOptions{})
if err != nil {
s.T().Fatal(err)
}
}