@@ -20,7 +20,6 @@ import (
20
20
"k8s.io/client-go/tools/clientcmd"
21
21
"math/rand"
22
22
"os"
23
- "os/exec"
24
23
"time"
25
24
)
26
25
@@ -56,7 +55,7 @@ var _ = Describe("CNIGenie", func() {
56
55
interfaceName := "eth0"
57
56
glog .Info (interfaceName )
58
57
59
- FIt ("should succeed calico networking for pod" , func () {
58
+ It ("should succeed calico networking for pod" , func () {
60
59
annots := make (map [string ]string )
61
60
annots ["cni" ] = "calico"
62
61
//Create a K8s Pod with calico cni
@@ -105,6 +104,7 @@ var _ = Describe("CNIGenie", func() {
105
104
glog .Info (interfaceName )
106
105
107
106
It ("should succeed romana networking for pod" , func () {
107
+ Skip ("Skip Adding romana networking for Pod" )
108
108
annots := make (map [string ]string )
109
109
annots ["cni" ] = "romana"
110
110
//Create a K8s Pod with calico cni
@@ -152,7 +152,7 @@ var _ = Describe("CNIGenie", func() {
152
152
interfaceName := "eth0"
153
153
glog .Info (interfaceName )
154
154
155
- FIt ("should succeed weave networking for pod" , func () {
155
+ It ("should succeed weave networking for pod" , func () {
156
156
annots := make (map [string ]string )
157
157
annots ["cni" ] = "weave"
158
158
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -199,7 +199,7 @@ var _ = Describe("CNIGenie", func() {
199
199
interfaceName := "eth0"
200
200
glog .Info (interfaceName )
201
201
202
- FIt ("should succeed multi-ip networking for pod" , func () {
202
+ It ("should succeed multi-ip networking for pod" , func () {
203
203
annots := make (map [string ]string )
204
204
annots ["cni" ] = "flannel,weave"
205
205
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -247,6 +247,7 @@ var _ = Describe("CNIGenie", func() {
247
247
glog .Info (interfaceName )
248
248
249
249
It ("should succeed nocni networking for pod" , func () {
250
+ Skip ("Skip Adding nocni networking for Pod" )
250
251
annots := make (map [string ]string )
251
252
annots ["cni" ] = " "
252
253
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -290,7 +291,7 @@ var _ = Describe("CNIGenie", func() {
290
291
Context ("using cni-genie for configuring bridge CNI" , func () {
291
292
name := fmt .Sprintf ("nginx-bridge-%d" , rand .Uint32 ())
292
293
293
- FIt ("should succeed bridge networking for pod" , func () {
294
+ It ("should succeed bridge networking for pod" , func () {
294
295
annots := make (map [string ]string )
295
296
annots ["cni" ] = "bridge"
296
297
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -336,7 +337,7 @@ var _ = Describe("CNIGenie", func() {
336
337
interfaceName := "eth0"
337
338
glog .Info (interfaceName )
338
339
339
- FIt ("should succeed multi-ip (weave, bridge) networking for pod" , func () {
340
+ It ("should succeed multi-ip (weave, bridge) networking for pod" , func () {
340
341
annots := make (map [string ]string )
341
342
annots ["cni" ] = "weave,bridge"
342
343
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -380,7 +381,7 @@ var _ = Describe("CNIGenie", func() {
380
381
Context ("using cni-genie for configuring macvlan CNI" , func () {
381
382
name := fmt .Sprintf ("nginx-macvlan-%d" , rand .Uint32 ())
382
383
383
- FIt ("should succeed macvlan networking for pod" , func () {
384
+ It ("should succeed macvlan networking for pod" , func () {
384
385
annots := make (map [string ]string )
385
386
annots ["cni" ] = "macvlan"
386
387
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -424,7 +425,7 @@ var _ = Describe("CNIGenie", func() {
424
425
Context ("using cni genie to get multiple Ip and update in annotation" , func () {
425
426
name := fmt .Sprintf ("nginx-multiip-pref-%d" , rand .Uint32 ())
426
427
427
- FIt ("should succeed multi ip preference for pod" , func () {
428
+ It ("should succeed multi ip preference for pod" , func () {
428
429
annots := make (map [string ]string )
429
430
annots ["cni" ] = "weave,flannel"
430
431
@@ -470,6 +471,7 @@ var _ = Describe("CNIGenie", func() {
470
471
name := fmt .Sprintf ("nginx-sriov-%d" , rand .Uint32 ())
471
472
472
473
It ("should succeed sriov networking for pod" , func () {
474
+ Skip ("Skip Adding sriov networking for Pod" )
473
475
annots := make (map [string ]string )
474
476
annots ["cni" ] = "sriov"
475
477
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -514,7 +516,7 @@ var _ = Describe("CNIGenie", func() {
514
516
Context ("using cni genie to configure multiple ip from flannel plugin" , func () {
515
517
name := fmt .Sprintf ("nginx-multiip-from-flannel-%d" , rand .Uint32 ())
516
518
517
- FIt ("should succeed multi ip preference for pod" , func () {
519
+ It ("should succeed multi ip preference for pod" , func () {
518
520
annots := make (map [string ]string )
519
521
annots ["cni" ] = "flannel,flannel"
520
522
@@ -560,7 +562,7 @@ var _ = Describe("CNIGenie", func() {
560
562
Context ("using cni genie to configure multiple ip from flannel plugin and weave plugin" , func () {
561
563
name := fmt .Sprintf ("nginx-multiip--%d" , rand .Uint32 ())
562
564
563
- FIt ("should succeed multi ip preference for pod" , func () {
565
+ It ("should succeed multi ip preference for pod" , func () {
564
566
annots := make (map [string ]string )
565
567
annots ["cni" ] = "flannel,weave,flannel"
566
568
@@ -606,7 +608,7 @@ var _ = Describe("CNIGenie", func() {
606
608
Context ("using cni-genie for verifying default plugin case : pod with no annotation attributes" , func () {
607
609
name := fmt .Sprintf ("nginx-pod-no-annotation-%d" , rand .Uint32 ())
608
610
609
- FIt ("should succeed default(weave) networking for pod" , func () {
611
+ It ("should succeed default(weave) networking for pod" , func () {
610
612
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
611
613
ObjectMeta : metav1.ObjectMeta {
612
614
Name : name ,
@@ -649,7 +651,7 @@ var _ = Describe("CNIGenie", func() {
649
651
Context ("using cni-genie for verifying default plugin case : pod with non cni annotations" , func () {
650
652
name := fmt .Sprintf ("nginx-pod-non-cni-annotation-%d" , rand .Uint32 ())
651
653
652
- FIt ("should succeed default(weave) networking for pod" , func () {
654
+ It ("should succeed default(weave) networking for pod" , func () {
653
655
annots := make (map [string ]string )
654
656
annots ["build" ] = "two"
655
657
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -694,7 +696,7 @@ var _ = Describe("CNIGenie", func() {
694
696
Context ("using cni-genie for verifying default plugin case : pod with blank annotation field" , func () {
695
697
name := fmt .Sprintf ("nginx-pod-blank-annotation-%d" , rand .Uint32 ())
696
698
697
- FIt ("should succeed default(weave) networking for pod" , func () {
699
+ It ("should succeed default(weave) networking for pod" , func () {
698
700
annots := make (map [string ]string )
699
701
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
700
702
ObjectMeta : metav1.ObjectMeta {
@@ -738,7 +740,7 @@ var _ = Describe("CNIGenie", func() {
738
740
Context ("using cni-genie for verifying plugin with interface name case : pod with plugin+interface name case" , func () {
739
741
name := fmt .Sprintf ("nginx-pod-with-ifname-%d" , rand .Uint32 ())
740
742
741
- FIt ("should succeed multinetworking with ifname for pod" , func () {
743
+ It ("should succeed multinetworking with ifname for pod" , func () {
742
744
annots := make (map [string ]string )
743
745
annots ["cni" ] = "flannel,weave@eth4,flannel@eth5, flannel"
744
746
_ , err := clientset .CoreV1 ().Pods (TEST_NAMESPACE ).Create (& v1.Pod {
@@ -778,7 +780,7 @@ var _ = Describe("CNIGenie", func() {
778
780
})
779
781
})
780
782
Describe ("To create logical network crd objects " , func () {
781
- FIt ("should succeed crd creation" , func () {
783
+ It ("should succeed crd creation" , func () {
782
784
config , err := clientcmd .BuildConfigFromFlags ("" , testKubeConfig )
783
785
apiextensionsclient , err = apiextensionsclientset .NewForConfig (config )
784
786
if err != nil {
@@ -822,7 +824,7 @@ var _ = Describe("CNIGenie", func() {
822
824
Expect ("Success" ).To (Equal ("Success" ))
823
825
})
824
826
825
- FIt ("should succeed weave networking for pod" , func () {
827
+ It ("should succeed weave networking for pod" , func () {
826
828
glog .Info ("Add weave networking for Pod by specifying logical network" )
827
829
name := fmt .Sprintf ("nginx-weave-%d" , rand .Uint32 ())
828
830
interfaceName := "eth0"
@@ -855,7 +857,7 @@ var _ = Describe("CNIGenie", func() {
855
857
})
856
858
857
859
Describe ("To create NetworkAttachmentDefinition CRD " , func () {
858
- FIt ("should succeed crd creation" , func () {
860
+ It ("should succeed crd creation" , func () {
859
861
config , err := clientcmd .BuildConfigFromFlags ("" , testKubeConfig )
860
862
apiextensionsclient , err = apiextensionsclientset .NewForConfig (config )
861
863
if err != nil {
@@ -896,7 +898,7 @@ var _ = Describe("CNIGenie", func() {
896
898
Expect ("Success" ).To (Equal ("Success" ))
897
899
})
898
900
899
- FIt ("To create NetworkAttachmentDefinition object flannel" , func () {
901
+ It ("To create NetworkAttachmentDefinition object flannel" , func () {
900
902
config , err := clientcmd .BuildConfigFromFlags ("" , testKubeConfig )
901
903
netattachclient , err := netattachclientset .NewForConfig (config )
902
904
if err != nil {
@@ -917,7 +919,7 @@ var _ = Describe("CNIGenie", func() {
917
919
})
918
920
919
921
//Create NetworkAttachmentDefinition object with plugin configuration as file
920
- FIt ("To create NetworkAttachmentDefinition object weave" , func () {
922
+ It ("To create NetworkAttachmentDefinition object weave" , func () {
921
923
config , err := clientcmd .BuildConfigFromFlags ("" , testKubeConfig )
922
924
netattachclient , err := netattachclientset .NewForConfig (config )
923
925
if err != nil {
@@ -933,7 +935,7 @@ var _ = Describe("CNIGenie", func() {
933
935
})
934
936
935
937
//flannel, weave networking for Pod
936
- FIt ("should succeed weave networking for pod" , func () {
938
+ It ("should succeed weave networking for pod" , func () {
937
939
glog .Info ("Inside Check for adding weave-flannel networking" )
938
940
name := fmt .Sprintf ("nginx-netattachdef-flannel-weave-%d" , rand .Uint32 ())
939
941
interfaceName := "eth0"
@@ -986,9 +988,6 @@ var _ = BeforeSuite(func() {
986
988
panic (err )
987
989
}
988
990
createNamespace (clientset )
989
- // Start all the required plugins through shell script
990
- cmd := exec .Command ("../plugins_install.sh" , "-all" )
991
- _ , err = cmd .Output ()
992
991
993
992
})
994
993
@@ -1015,10 +1014,6 @@ var _ = AfterSuite(func() {
1015
1014
panic (err )
1016
1015
}
1017
1016
1018
- // Delete all the installed plugins after usage
1019
- cmd := exec .Command ("../plugins_install.sh" , "-deleteall" )
1020
- _ , err = cmd .Output ()
1021
-
1022
1017
})
1023
1018
1024
1019
func createNamespace (clientset * kubernetes.Clientset ) {
0 commit comments