@@ -621,7 +621,6 @@ func TestStackGenerateRouteGroup(t *testing.T) {
621621 expectError bool
622622 expectedAnnotations map [string ]string
623623 expectedHosts []string
624- expectedBackend []rgv1.RouteGroupBackend
625624 expectedRouteGroup * rgv1.RouteGroup
626625 }{
627626 {
@@ -686,12 +685,6 @@ func TestStackGenerateRouteGroup(t *testing.T) {
686685 "routegroup" : "annotation" ,
687686 },
688687 expectedHosts : []string {"foo-v1.example.org" },
689- expectedBackend : []rgv1.RouteGroupBackend {
690- {
691- Name : "fwd" ,
692- Type : rgv1 .ForwardRouteGroupBackend ,
693- },
694- },
695688 expectedRouteGroup : & rgv1.RouteGroup {
696689 ObjectMeta : metav1.ObjectMeta {
697690 Name : "foo-v1" ,
@@ -806,21 +799,7 @@ func TestStackGenerateRouteGroup(t *testing.T) {
806799 if tc .expectedRouteGroup != nil {
807800 expected = tc .expectedRouteGroup
808801 }
809- // if tc.expectedBackend != nil {
810- // expected.Spec.Backends = tc.expectedBackend
811- // }
812- // for _, be := range tc.expectedBackend {
813- // found := false
814- // for _, specBE := range rg.Spec.Backends {
815- // if be.Type == specBE.Type {
816- // found = true
817- // break
818- // }
819- // }
820- // if !found {
821- // t.Fatalf("Failed to find backend %v, got %v", be, rg.Spec.Backends)
822- // }
823- // }
802+
824803 require .Equal (t , expected , rg )
825804 })
826805 }
@@ -891,7 +870,7 @@ func TestStackGenerateRouteGroupSegment(t *testing.T) {
891870 Hosts : []string {"example.teapot.zalan.do" },
892871 Routes : []rgv1.RouteGroupRouteSpec {
893872 {
894- Predicates : []string {" Method(\ " GET\" )" },
873+ Predicates : []string {` Method("GET")` },
895874 },
896875 },
897876 },
@@ -908,8 +887,8 @@ func TestStackGenerateRouteGroupSegment(t *testing.T) {
908887 rgSpec : & zv1.RouteGroupSpec {
909888 Hosts : []string {"example.teapot.zalan.do" },
910889 Routes : []rgv1.RouteGroupRouteSpec {
911- {Predicates : []string {" Method(\ " GET\" )" }},
912- {Predicates : []string {" Method(\ " PUT\" )" }},
890+ {Predicates : []string {` Method("GET")` }},
891+ {Predicates : []string {` Method("PUT")` }},
913892 },
914893 },
915894 lowerLimit : 0.1 ,
0 commit comments