Skip to content

Commit

Permalink
test(MeshLoadBalancingStrategy): add newly invalid case, adjust valid…
Browse files Browse the repository at this point in the history
… case

Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont committed Sep 25, 2024
1 parent 652739f commit 2a0d70a
Showing 1 changed file with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,29 @@ to:
- to:
type: AnyExcept
`),
ErrorCases(
"invalid MeshGateway and to MeshService",
[]validators.Violation{{
Field: "spec.to[0].targetRef.kind",
Message: "value is not supported, only Mesh is allowed if loadBalancer is set",
}},
`
type: MeshLoadBalancingStrategy
mesh: mesh-1
name: route-1
targetRef:
kind: MeshGateway
name: edge-gateway
to:
- targetRef:
kind: MeshService
name: svc-1
default:
loadBalancer:
type: LeastRequest
leastRequest:
activeRequestBias: "1.3"
`),
)

Expand Down Expand Up @@ -535,10 +558,6 @@ to:
default:
localityAwareness:
disabled: true
loadBalancer:
type: LeastRequest
leastRequest:
activeRequestBias: "1.3"
`),
XEntry(
"to MeshExternalService",
Expand Down

0 comments on commit 2a0d70a

Please sign in to comment.