mirror of
https://github.com/alibaba/higress.git
synced 2026-05-28 22:57:31 +08:00
Feat: upgrade istio from 1.19.5 to 1.27.1 (#3066)
This commit is contained in:
@@ -18,12 +18,12 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"istio.io/istio/pkg/config"
|
||||
"istio.io/istio/pkg/config/schema/gvk"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
k8s "sigs.k8s.io/gateway-api/apis/v1beta1"
|
||||
|
||||
"github.com/alibaba/higress/v2/pkg/config/constants"
|
||||
"istio.io/istio/pilot/pkg/features"
|
||||
"istio.io/istio/pkg/config"
|
||||
"istio.io/istio/pkg/config/schema/gvk"
|
||||
)
|
||||
|
||||
func TestCreateRouteStatus(t *testing.T) {
|
||||
@@ -32,7 +32,14 @@ func TestCreateRouteStatus(t *testing.T) {
|
||||
parentStatus := []k8s.RouteParentStatus{
|
||||
{
|
||||
ParentRef: parentRef,
|
||||
ControllerName: constants.ManagedGatewayController,
|
||||
ControllerName: k8s.GatewayController("another-gateway-controller"),
|
||||
Conditions: []metav1.Condition{
|
||||
{Type: "foo", Status: "bar"},
|
||||
},
|
||||
},
|
||||
{
|
||||
ParentRef: parentRef,
|
||||
ControllerName: k8s.GatewayController(features.ManagedGatewayController),
|
||||
Conditions: []metav1.Condition{
|
||||
{
|
||||
Type: string(k8s.RouteReasonAccepted),
|
||||
@@ -48,6 +55,13 @@ func TestCreateRouteStatus(t *testing.T) {
|
||||
LastTransitionTime: lastTransitionTime,
|
||||
Message: "All references resolved",
|
||||
},
|
||||
{
|
||||
Type: string(RouteConditionResolvedWaypoints),
|
||||
Status: metav1.ConditionTrue,
|
||||
ObservedGeneration: 1,
|
||||
LastTransitionTime: lastTransitionTime,
|
||||
Message: "All waypoints resolved",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -100,7 +114,7 @@ func TestCreateRouteStatus(t *testing.T) {
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := createRouteStatus(tt.args.gateways, tt.args.obj, tt.args.current)
|
||||
got := createRouteStatus(tt.args.gateways, "default", tt.args.obj.Generation, tt.args.current)
|
||||
equal := reflect.DeepEqual(got, tt.args.current)
|
||||
if equal != tt.wantEqual {
|
||||
t.Errorf("route status: old: %+v, new: %+v", tt.args.current, got)
|
||||
|
||||
Reference in New Issue
Block a user