Skip to content

Commit

Permalink
fix(test): defines weight for RouteSpec
Browse files Browse the repository at this point in the history
without it tests are failing probably due to changes in api specs we download or kube-envtest. Both are moving targets without version pinned
  • Loading branch information
bartoszmajsak committed Jul 27, 2023
1 parent ed468e7 commit 6531ab6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions controllers/project_mesh_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var _ = When("Namespace is created", Label(labels.EvnTest), func() {
var (
testNs *v1.Namespace
objectCleaner *Cleaner
routeWeight = int32(100)
)

BeforeEach(func() {
Expand Down Expand Up @@ -200,7 +201,8 @@ var _ = When("Namespace is created", Label(labels.EvnTest), func() {
Spec: routev1.RouteSpec{
Host: "istio.io",
To: routev1.RouteTargetReference{
Name: "odh-gateway",
Name: "odh-gateway",
Weight: &routeWeight,
},
},
}
Expand Down Expand Up @@ -264,7 +266,8 @@ var _ = When("Namespace is created", Label(labels.EvnTest), func() {
Spec: routev1.RouteSpec{
Host: "istio.io",
To: routev1.RouteTargetReference{
Name: "odh-gateway",
Name: "odh-gateway",
Weight: &routeWeight,
},
},
}
Expand Down Expand Up @@ -359,8 +362,9 @@ var _ = When("Namespace is created", Label(labels.EvnTest), func() {
Spec: routev1.RouteSpec{
Host: "istio.io",
To: routev1.RouteTargetReference{
Name: "istio-ingressgateway",
Kind: "Service",
Name: "istio-ingressgateway",
Kind: "Service",
Weight: &routeWeight,
},
},
}
Expand Down

0 comments on commit 6531ab6

Please sign in to comment.